API referenceCore SDK

pdfGetMeasureObj

Read a full /Measure dictionary's structured contents

C
BOOL32 __stdcall pdfGetMeasureObj(IMSR Measure, TPDFMeasure* Value);
Delphi
function pdfGetMeasureObj(Measure: IMSR; var Value: TPDFMeasure): LongBool; stdcall;

Purpose. Read a full /Measure dictionary's structured contents back through an object-descriptor handle (IMSR, minted implicitly wherever a viewport/measure is exposed as an object elsewhere in the ABI) — covers both the rectilinear and geospatial measure kinds created by pdfCreateRectilinearMeasure/pdfCreateGeospatialMeasure.

Description. Follows the same GAP-7 object-descriptor pattern used throughout this SDK's richer read-back APIs: resolves Measure to its underlying handle, fills IsRectilinear plus the scale-ratio string (RA/RW, both ANSI and Wide forms — unlike pdfGetNamedDest above, this one does provide both), and mints a further set of nested /NumberFormat object descriptors for each of the X (distance-unit), Distance, and Area number-format arrays, exposing their counts via XCount/DistanceCount/AreaCount. Each nested descriptor is individually consumable via pdfGetNumberFormatObj elsewhere in the ABI.

Parameters.

ParameterDescription
MeasureAn IMSR object handle identifying a /Measure dictionary.
ValueOutput: IsRectilinear, RA/RW scale-ratio strings, and the 3 nested number-format descriptor arrays.

Return value. True if Measure resolves; False otherwise.

See also. pdfCreateRectilinearMeasure, pdfCreateGeospatialMeasure.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Core SDK
Category

Getters

Exported names

pdfGetMeasureObj

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.