Before I started using Ubuntu I used Nitro PDF reader to automatically extract images from PDF files. Is there a PDF reader for Linux that does this?
I would like to be able to extract images faster/easier than when taking a snapshot.
Before I started using Ubuntu I used Nitro PDF reader to automatically extract images from PDF files. Is there a PDF reader for Linux that does this?
I would like to be able to extract images faster/easier than when taking a snapshot.
pdfimages
pdfimages
is a PDF image extractor tool which saves the images in a PDF file to PPM, PBM, JPEG or JPEG 2000 file(s) format.
It's a part of the poppler-utils
package, which you'll need to install.
Usage: pdfimages [options] <PDF-file> <image-root>
-all
will extract images in original format.-j
will extract images as .jpg (caveat: images are converted and usually size is larger than original)Example1: The following extracts all images from a PDF file, saving them in their orginal format.
pdfimages -all in.pdf /tmp/out
Example2: The following extracts all images from a PDF file, saving them in JPEG format.
pdfimages -j in.pdf /tmp/out
Will save images from PDF file in.pdf
in files /tmp/out-000.jpg
(or /tmp/out-000.pbm
; see below), /tmp/out-001.jpg
, etc.
The pdfimages man page explains:
-j: Normally, all images are written as PBM (for monochrome images) or PPM for
non-monochrome images) files. With this option, images in DCT format are
saved as JPEG files. All non-DCT images are saved in PBM/PPM format as usual.