AddPageGeoViewport

Page properties, Measurement and coordinate units

Description

Appends a geospatial measurement viewport (/VP) with a /Subtype /GEO measure dictionary, /GCS coordinate system, and 4-corner control points (/LPTS and /GPTS) to the selected page per ISO 32000-2 §12.9

Syntax

Delphi

Function AddPageGeoViewport(Left, Bottom, Right, Top: Double; EPSG: Integer; LatMin, LonMin, LatMax, LonMax: Double; Const Name: WideString): Integer;

ActiveX

Function PDFlib::AddPageGeoViewport(Left As Double, Bottom As Double, Right As Double, Top As Double, EPSG As Long, LatMin As Double, LonMin As Double, LatMax As Double, LonMax As Double, Name As String) As Long

DLL

int DLAddPageGeoViewport(int InstanceID, double Left, double Bottom, double Right, double Top, int EPSG, double LatMin, double LonMin, double LatMax, double LonMax, const wchar_t* Name);
int DLAddPageGeoViewportA(int InstanceID, double Left, double Bottom, double Right, double Top, int EPSG, double LatMin, double LonMin, double LatMax, double LonMax, const char* Name);

Parameters

LeftLeft page coordinate of the viewport bounding box
BottomBottom page coordinate of the viewport bounding box
RightRight page coordinate of the viewport bounding box
TopTop page coordinate of the viewport bounding box
EPSGCoordinate system EPSG code (for example 4326 for WGS 84 or 3857 for Web Mercator); codes 4000 to 4999 are written as a geographic system (/GEOGCS) and all other codes as a projected system (/PROJCS), identified by /EPSG alone
LatMinMinimum latitude of the geographic bounding box in degrees
LonMinMinimum longitude of the geographic bounding box in degrees
LatMaxMaximum latitude of the geographic bounding box in degrees
LonMaxMaximum longitude of the geographic bounding box in degrees
NameOptional viewport name written to /Name

Return values

1 when the geospatial viewport was appended to the selected page, or 0 on failure

See also

PagePointToLatLon, LatLonToPagePoint, AddPageMeasureViewport