API referenceCore SDK

pdfCreateGeospatialMeasure

Attach a geospatial (/Subtype /GEO) /Measure dictionary

C
int32_t __stdcall pdfCreateGeospatialMeasure(PPDF IPDF, uint32_t Viewport, const char* Attributes);
Delphi
function pdfCreateGeospatialMeasure(const IPDF: PPDF; Viewport: Cardinal; const Attributes: PAnsiChar): Integer; stdcall;

Purpose. Attach a geospatial (/Subtype /GEO) /Measure dictionary to an existing viewport — the geospatial counterpart of pdfCreateRectilinearMeasure (Patterns, Shadings, ExtGState Creation, and Template Placement), storing caller-supplied attributes (GCS WKT string) verbatim rather than computing a rectilinear scale ratio.

Parameters.

ParameterDescription
IPDFDocument handle.
Viewport1-based index of an existing viewport on the current page.
AttributesCaller-supplied geospatial coordinate-system attributes (typically WKT), stored verbatim.

Return value. The Viewport index on success; 0 if there is no open page or Viewport doesn't identify an existing viewport.

See also. pdfCreateRectilinearMeasure.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateGeospatialMeasure(IntPtr IPDF, uint Viewport, [MarshalAs(UnmanagedType.LPStr)] string Attributes);
Area
Core SDK
Category

Object Creation

Exported names

pdfCreateGeospatialMeasure

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.