[poppler] Extracting geolocation metadata from a GeoPDF file

Phil Endecott spam_from_poppler at chezphil.org
Sun Mar 28 14:09:57 PDT 2010


Leonard Rosenthol wrote:
> Be aware that there are TWO SEPARATE "standards" for GIS 
> information in a PDF file - the TerraGo specification that 
> you note below, and the one that the ISO 32000 (aka PDF 
> standard) committee chose for inclusion in PDF 2.0 (32000-2) 
> which is currently implemented in Adobe Acrobat & Reader 9.  
> You may want/need to support both.

Yes, thanks.  Not a good situation.  As far as I can tell the files 
that I'm dealing with, which are US Geological Survey and Natural 
Resources Canada maps, currently all use (only) the TerraGo format.

I now have some code that attempts to dump the TerraGo-format GeoPDF 
stuff; it is here:

     http://svn.chezphil.org/geopdf/trunk

and in particular:

     http://svn.chezphil.org/geopdf/trunk/src/geopdf.cc

Note that this requires a hack to poppler's Page.h to make the pageObj 
public.  It basically works.

One aspect that I'm uncertain about is how to use the dict lookup 
method.  My understanding was that it takes a pointer to an object as 
the second parameter and copies the retrieved object there, and also 
returns a pointer to same object on success, or returns NULL on 
failure.  But this doesn't seem to be the case on failure.  How am I 
supposed to use this?


Regards,  Phil.






More information about the poppler mailing list