<

Xpdf - PDFtoPPM - Command Line Utility to Convert a PDF File to PPM, PGM, PBM

Posted on
7,135 Points
35 Views
1 Endorsement
Last Modified:
Experience Level: Intermediate
5:43
Joe Winograd
50+ years in computer industry •Everything from development to sales •CIO •Windows •Document Imaging •EE MVE 2015,2016,2018 •EE FELLOW 2017
In this ninth video of my Xpdf series, I discuss and demonstrate the PDFtoPPM tool, which converts a PDF file to color portable pixmap (PPM) format, grayscale portable graymap (PGM) format, or monochrome (black & white) portable bitmap (PBM) format. It creates a separate image file for each page of the 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.

Video Steps

1. Download the software


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.

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 PDFtoPPM tool


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

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

Step3

4. Set up a test folder


Create a test folder.

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

Copy a sample PDF file into your test folder, preferably one with numerous pages.

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 two files are in it - the PDFtoPPM executable and the sample PDF file.

Step5

6. Run the PDFtoPPM utility to create color images


Issue the following command in the command prompt:

pdftoppm TestFileName.pdf color

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. Run the PDFtoPPM utility to create grayscale and monochrome images


Issue the following commands in the command prompt:

pdftoppm -gray TestFileName.pdf gray
pdftoppm -mono TestFileName.pdf mono

Step7

8. Open the created images


Open the PPM, PGM, and PBM files to make sure that they were created correctly.

That's it! If you find this video to be helpful, please click the thumbs-up icon above. Thank you for watching!
1
0 Comments

Featured Post

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in 2013 or 2016. Now that Office 2019 is here, the bad news is that it is still missing, but the good news is that the same no-cost method that works to install it…
An EE member wants to move all open windows at once (not one window at a time) from a primary monitor to a secondary one by pressing a hotkey. Bonus: another hotkey that goes in the other direction — move all windows from the secondary to the primar…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month