Is there a reliable way to determine if a PDF was generated from a Powerpoint file?

pdf, pdf-generation, powerpoint

Solution

The creating application of a PDF is listed in its XMP metadata. You can see this quite easily in Acrobat 9 (and I believe earlier): go to `File > Properties`, click `Additional Metadata...`, then go to `Advanced` and it's listed under both XMP Core Properties and PDF Properties:

xmp:CreatorTool: Microsoft PowerPoint
pdf:Creator: Microsoft PowerPoint

I'm guessing you want to find this programatically, so you'll need to find a library to read this metadata that works with your language. Here is a list of some XMP tools.

Problem

Like the title says. Reason I ask is that we're converting PDFs to formatted ASCII text (using pdftotext) and only want to display the ones that look reasonably sane. PPT files tend to have text over images, diagonal text and others things that don't translate to ASCII very well, so we'd like to filter them out if we can.

Original source