DynaPDF Manual - Page 267

Previous Page 266   Index   Next Page 268

Function Reference
Page 267 of 839
/Bounds[0 0 0 1 1 1 1 0 0 0]
/GCS
{
/Type/PROJCS
/WKT
"PROJCS[\"WGS_1984_Lambert_Conformal_Conic\",GEOGCS[\"GCS_WGS_1984\",DA
TUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIM
EM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\
"Lambert_Conformal_Conic\"],PARAMETER[\"False_Easting\",0.0],PARAMETER[
\"False_Northing\",0.0],PARAMETER[\"Central_Meridian\",10.5],PARAMETER[
\"Standard_Parallel_1\",48.66666666666666],PARAMETER[\"Standard_Paralle
l_2\",53.66666666666666],PARAMETER[\"Latitude_Of_Origin\",51.0],UNIT[\"
Meter\",1.0]]"
}
/GPTS[47.09291 6.12161 54.98462 5.30494 54.99117 15.53156 47.09843
14.74047]
/LPTS[0 0 0 1 1 1 1 0]
A valid geospatial measure dictionary requires at least the keys /GCS and /GPTS. All other keys are
optional.
Example C++:
SI32 TestGeo(const PPDF* PDF, wchar_t* OutFileName)
{
pdfCreateNewPDFW(PDF, OutFileName);
pdfSetDocInfoA(PDF, diProducer, NULL);
SI32 bufSize;
// This example assumes that the above example string was copied to the file geo.txt.
char* attr = GetFileBuf("e:/geo.txt", bufSize);
// This code creates just an emptry page and adds a viewport to it. Open the file in
// Acrobat and check the coordinates with the Geospatial Location Tool, for example.
// It must show valid latitute and longitute coordinates. Distances can be measured
// too.
pdfAppend(PDF);
pdfSetBBox(PDF, pbMediaBox, 0.0, 0.0, 841.88806, 1190.54883);
SI32 vp = pdfCreateViewport(PDF, "Test", 51.2673, 88.08751, 793.90894, 1085.48682);
pdfCreateGeospatialMeasure(PDF, vp, attr);
free(attr);
pdfEndPage(PDF);
return pdfCloseFile(PDF);
}
Return values:
If the function succeeds the return value is the handle of the measure dictionary, a value greater or
equal zero. If the function fails the return value is a negative error code.
 

Previous topic: CreateGeospatialMeasure

Next topic: CreateGoToAction