<

Go Premium for a chance to win a PS4. Enter to Win

x

Xpdf - PDFfonts - Command Line Utility to List Fonts Used in a PDF File

Posted on
7,956 Points
256 Views
2 Endorsements
Last Modified:
Experience Level: Intermediate
5:13
Joe Winograd, EE MVE 2015&2016
50+ yrs in computer industry. Everything from programming to sales. OS kernel dev on mainframes. CIO. Document imaging. EE MVE 2015 & 2016.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any place where a command line call can be made. In addition to the name of the font, it shows the font type and whether or not the font is embedded in the PDF file (and, if embedded, whether or not it is a subset), along with other font information that is discussed in the documentation file.

Video Steps

1. Download the software


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities


Go to the folder where you unzipped the downloaded ZIP file and find the doc folder.

Step2

3. Read the documentation for the PDFfonts tool


Go into the doc folder and find the plain text file called pdffonts.txt.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFfonts tool.

Step3

4. Set up a test folder


Create a test folder.

Copy pdffonts.exe from the unzipped bin32 folder into your test folder.

Copy a couple of sample PDF files into your test folder, preferably ones with many different fonts.

Step4

5. Set up a command prompt for testing


Open a command prompt window.

Navigate to your test folder.

Issue a DIR command in the command prompt to be sure that only the PDFfonts executable and the sample PDF files are in it.

Step5

6. Run the PDFfonts utility


Issue the following command in the command prompt:

pdffonts NameOfYourTestFile.pdf

If you receive the following error messages, ignore them:
Config Error: No display font for 'Symbol'
Config Error: No display font for 'ZapfDingbats'

Step6

7. Observe the output from PDFfonts


Step7

8. Run the PDFfonts utility again, but this time redirect the output to a file


Issue the following command in the command prompt:

pdffonts NameOfYourTestFile.pdf>fonts.txt

Step8

9. Verify that the output of the PDFfonts utility went into the file


Open the text file created in the previous step with any text editor, such as Notepad.

Step9

10. View the fonts in a PDF editor/reader/viewer


You may, of course, show the fonts in a PDF editor/reader/viewer, such as Adobe Acrobat or Adobe Reader, usually via File>Properties>Fonts, but they are not command line tools and there is no easy way to get the information into a file.

Step10
That's it! If you find this video to be helpful, please click the thumbs-up icon below. Thank you for watching!
2
Comment
2 Comments
 
 

Administrative Comment

by:Kyle Santos
Congratulations!  Your video has been Accepted and is now published on Experts Exchange.  Thank you for your contributions.
0
 
LVL 56

Author Comment

by:Joe Winograd, EE MVE 2015&2016
Hi Kyle,
Thanks for publishing and upvoting — both appreciated! Regards, Joe
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Join & Write a Comment

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month