GetMeasurementUnits

Measurement and coordinate units

Description

Returns the measurement units currently applied to the selected document as one of the legacy integer codes accepted by SetMeasurementUnits.

The unit is derived from the active document scale: a scale of 25.4/72 identifies millimetres and a scale of 1/72 identifies inches; every other scale reports default user space.

Syntax

Delphi

Function TPDFlib.GetMeasurementUnits: Integer;

DLL

int DLGetMeasurementUnits(int InstanceID);

Return values

0Default user space (1/72 inch per unit)
1Millimetres
2Inches

Remarks

Use GetMeasurementUnit to read the same state as the TPDFlibMeasurementUnit enumeration, which also distinguishes twips and points.