Arrow

Extract font information and size from PDFs for free

First published on April 12, 2015

My company was implementing a tool to auto-generate PDF reports from a web content management system. We needed to extract font information from the design mock-up PDF. While you can extract a list of fonts used in most free PDF readers including Adobe Reader — go to File > Document Properties > Fonts — we needed the font sizes and the exact places where each font was used.

With the paid Adobe Acrobat Professional you can edit text, view specific font information, and a lot more, but since we only needed very specific functionality, we looked for a free solution first.

There are apparenty quite a few free command line tools that can extract font information, but ones with a graphical user interface were harder to find. I stumbled upon PDF-XChange Editor: PDF-XChange Editor’s full version can be purchased for $43.50 US (which warrants a good look if you need its more advanced features). Its free version allows you to use the “Edit Content Tool” where you can not only edit text, but get the font and font size information:

Edit Content Tool in PDF-Xchange Editor

This was exactly what we needed.

You can also annotate the document, which enabled us to quickly make some nice QA documentation on the font information:

Edit Content Tool in PDF-Xchange Editor

The only downside to PDF-Xchange for the purposes of extracting font information is that it is only available on Windows operating systems.

Extra note: check out wkhtmltopdf if you need a command line tool to convert HTML5 to PDF!

Arrow

Speak your mind

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word