Monday, May 6, 2024
277
rated 0 times [  277] [ 0]  / answers: 1 / hits: 141474  / 2 Years ago, fri, february 18, 2022, 4:26:16

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.


More From » software-recommendation

 Answers
5

Use 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>




  • option -all will extract images in original format.

  • option -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.

[#37650] Saturday, February 19, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tialmes

Total Points: 14
Total Questions: 108
Total Answers: 102

Location: Oman
Member since Thu, Jun 16, 2022
2 Years ago
;