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 LongDLL
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
| Left | Left page coordinate of the viewport bounding box |
|---|---|
| Bottom | Bottom page coordinate of the viewport bounding box |
| Right | Right page coordinate of the viewport bounding box |
| Top | Top page coordinate of the viewport bounding box |
| EPSG | Coordinate 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 |
| LatMin | Minimum latitude of the geographic bounding box in degrees |
| LonMin | Minimum longitude of the geographic bounding box in degrees |
| LatMax | Maximum latitude of the geographic bounding box in degrees |
| LonMax | Maximum longitude of the geographic bounding box in degrees |
| Name | Optional 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