In this sixth video of the Xpdf
series, we discuss and demonstrate the PDFtoPNG
utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. 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.
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.
2. Locate the documentation folder for the Xpdf utilities
Go to the folder where you unzipped the downloaded ZIP file and find the doc
3. Read the documentation for the PDFtoPNG tool
Go into the doc
folder and find the plain text file called pdftopng.txt
Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFtoPNG
4. Set up a test folder
Create a test folder.
from the unzipped bin32
folder into your test folder.
Copy a sample PDF file into your test folder. Of course, it will work fine with a one-page PDF file, but it is more instructive to test it with a multi-page PDF.
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 PDFtoPNG executable and the sample PDF file.
6. Run the PDFtoPNG utility
Issue the following command in the command prompt: