GetMeasurementUnit
Measurement and coordinate units
Description
Returns the measurement units currently applied to the selected document as a TPDFlibMeasurementUnit value, the typed counterpart of the legacy integer codes reported by GetMeasurementUnits.
The unit is derived from the active document scale: a scale of 25.4/72 identifies millimeters, 1/72 identifies inches, and 20 identifies twips; every other scale, including the default scale of one point per unit, reports points.
Syntax
Delphi
Function TPDFlib.GetMeasurementUnit: TPDFlibMeasurementUnit;
DLL
int DLGetMeasurementUnit(int InstanceID);
Return values
The returned value is one of muMillimeters, muInches, muTwips, or muPoints; muPixels is never returned because the legacy document scale cannot represent it.
Remarks
Use SetMeasurementUnit to apply a typed unit, and ConvertToPoints / ConvertFromPoints for pure conversions between units and points.