pdfimages is a PDF image extractor utility/tool under Linux operating system. It can extract images from PDF file and save them under either Portable Pixmap(PPM), Portable Bitmap(PBM) or JPEG/JPG files. This utility should be installed by default in Ubuntu Hardy, at least it is the case in my installation. If not, you can run the following command to install the utility tools:
user@www$ sudo apt-get install poppler-utils
To extract images is simple, just fire the command:
user@www$ pdfimages [pdffile] [directory]
The second parameter is the directory that the extracted images will be saved. So the example would be
user@www$ pdfimages example.pdf /tmp
This command will save the images under ppm format by default. To save images in JPEG/JPG format, use the -j option:
user@www$ pdfimages -j example.pdf /tmp

Leave a Reply

Your email address will not be published. Required fields are marked *