[poppler] Getting metadata?

Kristian Høgsberg krh at bitplanet.net
Fri Mar 4 21:53:17 PST 2005


Brad Hards wrote:
> I'm working on a conversion of the KDE PDF meta-data plugin to Poppler - it 
> current exec()'s pdfinfo. I have it working for the more standard things, 
> such as number of pages, whether it is encrypted, whether it is linearised, 
> and which PDF version the document is. 
> 
> I'm having trouble figuring out some of the deeper stuff, like how to get the 
> date/time for creation and modification, and what the fonts are. I saw 
> readMetadata(), and gave that a try (calling GooString->getCString() on the 
> result), but it segfaulted.
> 
> So given a PDFDoc object, how do I extract and convert the metadata?

If you were getting this data from pdfinfo before, I'd suggest taking a 
look at the source code for that tool -- it's only 377 lines of code, so 
it should be pretty easy to figure out what's going on.

cheers,
Kristian



More information about the poppler mailing list