pdfimages - Extract & Save Images From A PDF File under Linux

www.lau‮rutt‬i.com
pdfimages - Extract & Save Images From A PDF File under Linux

The pdfimages command is a tool that is part of the poppler-utils package, which is a collection of utilities for working with PDF files on Linux. The pdfimages command can be used to extract images from a PDF file and save them as separate image files.

To use pdfimages, open a terminal and navigate to the directory where you want to save the extracted images. Then, run the following command:

pdfimages [options] input.pdf output_prefix

Replace input.pdf with the path to the PDF file you want to extract images from, and output_prefix with the prefix you want to use for the output image filenames. For example, if you want to extract the images from input.pdf and save them with the prefix "image", you would use the following command:

pdfimages input.pdf image

This will extract all of the images from input.pdf and save them as separate image files in the current directory, using the specified prefix and a number as the filename. For example, the first image would be saved as "image-001.ppm", the second image as "image-002.ppm", and so on.

You can also use various options to control the behavior of pdfimages. For example, you can use the -p option to extract only a specific range of pages from the PDF file, or the -j option to save the images as JPEG files instead of the default PPM format.

For more information on the pdfimages command and its options, you can run man pdfimages or consult the poppler-utils documentation.

Created Time:2017-10-30 10:17:56  Author:lautturi