<

xpdfrc - Configuration File for All Xpdf Utilities

Posted on
12,672 Points
472 Views
2 Endorsements
Last Modified:
Published
Experience Level: Intermediate
5:59
Joe Winograd
50+ years in computers
EE FELLOW 2017 — first ever recipient of Fellow award
MVE 2015,2016,2018
CERTIFIED GOLD EXPERT
DISTINGUISHED EXPERT
This is the eleventh — and final — video of my Experts Exchange Micro Tutorials on the Xpdf utilities. The first video is an overview of the command line tools. The next nine videos are tutorials on all them:

PDFimages - Extract Images from PDF Files
PDFtoText - Convert PDF Files to Plain Text Files
PDFinfo - Retrieve Page Count and Other Information from PDF Files
PDFdetach - Detach Attachments from PDF Files
PDFtoPNG - Convert a Multi-page PDF File into Separate PNG Files
PDFfonts - List Fonts Used in a PDF File
PDFtoHTML - Convert a PDF File to HTML
PDFtoPPM - Convert a PDF File to PPM, PGM, PBM
PDFtoPS - Convert a PDF File to PS (PostScript)

This last video in the series discusses xpdfrc, which is the single configuration file that Xpdf uses for all nine utilities. It provides an enormous number of options, allowing extensive control of the tools, such as character mapping, font configuration, PostScript control, rasterizer settings, text control, and much more.

Video Steps

1. Download the software and fonts


You may have already downloaded the Xpdf tools while watching one of my earlier videos in the series, but there has since been an upgrade from Version 3 to Version 4 and there is a new download site:

https://www.xpdfreader.com/download.html

Visit that site and download the pre-compiled Windows binary ZIP archive, then unzip it.

Download the Symbol and Zapf Dingbats fonts from the same page.

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 configuration file - xpdfrc


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

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

Step3

4. Review the sample configuration file


Go into the doc folder and find the plain text file called sample-xpdfrc.

Open it with any text editor, such as Notepad, and review it. This is a sample configuration file.

Step4

5. Set up a test folder


Create a test folder.

Copy these files into your test folder:
pdftoppm.exe
pdftops.exe
d050000l.pfb
s050000l.pfb


Copy a sample PDF file into your test folder.

Step5

6. Create the xpdfrc file


Using any text editor, such as Notepad, create a plain text file in your test folder and name it xpdfrc (without the .txt file extension) and put these two lines in it:

fontFile Symbol "s050000l.pfb"
fontFile ZapfDingbats "d050000l.pfb"


Step6

7. Run the PDFtoPPM and PDFtoPS utilities


Run the same commands as shown in my PDFtoPPM and PDFtoPS videos, which produced these font errors:
Config Error: No display font for 'Symbol'
Config Error: No display font for 'ZapfDingbats'

Confirm that the errors no longer occur — due to the fixes in the xpdfrc file.

Step7

8. Experiment with other features in the configuration file


That completes your first test of the xpdfrc configuration file. I encourage you to experiment with its many capabilities.

If you find this video to be helpful, please click the thumbs-up icon below.

Thank you for completing my Experts Exchange video Micro Tutorial series on the Xpdf utilities. I hope you've enjoyed watching it as much as I've enjoyed creating it. Regards, Joe
2
2 Comments
LVL 69

Comment

by:Gustav Brock
Joe, you forget to mention, that the downloaded fonts are contained in a .gz file, not familiar to Windows users.
However, they can be extracted with the tar command which (at least) is present in Windows 11, for example:

tar -xvzf C:\Path\xpdf-t1fonts.tar.gz -C C:\Path

Open in new window

That will extract the files to: C:\Path\xpdf-t1fonts
1
LVL 76

Author Comment

by:Joe Winograd
Hi Gustav,
Thanks for mentioning that. I never thought about it, because I've been using an excellent file manager, Total Commander NOT Windows/File Explorer, for all file management functions for 20+ years. Total Commander directly handles .gz files...simply double-click it, which shows the .tar file...then double-click that and it shows the folder. At that point, the copy function automatically unpacks the compressed file to wherever you want it (same as it does for .zip files). I'm sure that other top quality file managers do it, too, such as Directory Opus (DOpus). All of that said, there are certainly many users out there who use the built-in Windows/File Explorer for file management, so I appreciate your pointing that out. Regards, Joe
1
Excel formula name translator: Spanish - English and English - Spanish and work in both languages  
This article presents an AutoHotkey (V1) script that creates a plain text report with information about all drives in a system that have a drive letter, such as C, D, E, etc. The information in the report is Type of drive, Status, Capacity, Free Spa…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month