We can use the Linux command tool pdfimages to extract the images from the pdf file pages.
To extract all image we can use this:
1 | $ pdfimages your_input.pdf.pdf images-out |
The your_input.pdf is your pdf file.
The images-out it’s the output name of the images.
The images will be saved with the name image-out like :
1 2 3 | image-out-000.ppm image-out-003.ppm image-out-006.ppm image-out-001.ppm image-out-004.ppm image-out-007.ppm image-out-002.ppm image-out-005.ppm image-out-008.ppm |
We can select the images just from pages we want by using option:
1 | -f 5 -l 10 |
This tells to extract just from starting page number: -f to ending page number -l.
1 | $ pdfimages -f 5 -l 10 your_input.pdf.pdf images-out |
If the pdf file is password locked than we can pass the password using the option -upw.