Do you want to extract images from pdf file?. Yes, you can easily obtain images from any pdf file by using a simple yet efficient tool named as “pdfimages”. By default, the extracted image format is portable pixmap (ppm) or portable bitmap (pbm).
However, you can easily change these image format to jpeg or png. Just have a glance at this article to find out how to extract images from pdf file in Ubuntu 14.04
Steps to extract images from pdf file:
Step 1: First open your Ubuntu terminal and then type: “pdfimages /home/teckpix/Documents/sample.pdf /home/teckpix/Documents/ExtractedImages/image”.
Step 2: Here, You may see that all the images inside sample.pdf are now extracted under ExtractedImage folder having ppm image format.
Step 3: If you want to change the format of images as JPG then type: “pdfimages -j /home/teckpix/Documents”/sample.pdf /home/teckpix/Documents/ExtractedImages/image. (Note: you can also change these image formats to PNG and TIFF by using “-png” and “-tiff” respectively).
Step 4: Here, you’ll see all your image has been changed to JPG image format.
Step 5: Now, if you want to extract images from particular page, then type: “pdfimages -f 2 -j /home/teckpix/Documents/sample.pdf /home/teckpix/Documents/ExtractedImages/image”. (Where ‘2’ in this command is the page number).
Step 6: If you want to extract images from a particular page and simultaneously change the image format, then type: “pdfimages -l 1 -j /home/teckpix/Documents/sample.pdf /home/teckpix/Documents/ExtractedImages/image”.
Step 7: Finally, you can also use: “pdfimages -opw ‘password’ -j /home/teckpix/Documents/sample.pdf /home/teckpix/Documents/ExtractedImages/image”. (Where “-opw” is used when a file contains owner password and for user password you can use “-upw” in place of “-opw”).
That’s all friends. Keep reading.
Leave a Reply