<

Xpdf - PDFimages - Extract Images from PDF Files

Posted on
20,231 Points
1,531 Views
7 Endorsements
Last Modified:
Awarded
Experience Level: Beginner
5:12
Joe Winograd
50+ years in computer industry •Everything from development to sales •CIO •Windows •Document Imaging •EE MVE 2015,2016,2018 •EE FELLOW 2017
This second video of my Xpdf series discusses and demonstrates the PDFimages utility, which, in a single command, is able to extract all the images from a PDF file and save each one in a separate image file (PBM, PPM, or JPG). It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

You'll see that this video says it is "Part 2 of 3". However, after publishing the first three tutorials, I decided to do one for each of the other tools, as well as one for the Xpdf configuration file (xpdfrc). Links to all of the videos are in the first video in this series.

Video Steps

1. Download and install the software.

You may have already downloaded and installed the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website at:

http://www.foolabs.com/xpdf/

Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the Xpdf utilities for Windows.
precompiled binaries

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.
documentation folder

3. Read the documentation for the PDFimages tool.

Go into the <doc> folder and find the plain text file called <pdfimages.txt>.

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

4. Set up a test folder.

Create a test folder.

Copy <pdfimages.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file into your test folder (in the video and the screenshots below, the file is called <RMP.pdf>).
test folder

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 PDFimages executable and the sample PDF file.
cmd prompt dir

6. Run the PDFimages utility on the sample PDF file.

In the command prompt window, enter the following command:

pdfimages -j samplefilename.pdf images
command line

7. Display the image files that were created.

Issue a DIR command in the command prompt to show that the image files were created. There should be one image file for each image in the PDF file.
cmd prompt dir 2

8. Verify that proper JPG image files were created.

Using whatever photo viewing software you prefer, such as Paint or Picture Manager, open up a few of the JPG image files to verify that they were created properly.
verify images
That's it! If you find this video to be helpful, please click the thumbs-up icon below. Thank you for watching!
7
2 Comments
LVL 29

Expert Comment

by:Andrew Leniart
Great video. You make it easy Joe, thanks for sharing!
0
LVL 67

Author Comment

by:Joe Winograd
You're welcome, Andrew, and thanks to you for the kind words and the endorsement — both appreciated! Regards, Joe
0

Featured Post

CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

A guide on the process of automating change or gathering data from multiple Cisco IOS devices. If this can help you - please use it. God knows we all need a few extra minutes in our day.
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…
Total Time: 14:51

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month