24

I am reviewing the answer here about Extracting embedded images from a PDF. It is not in Homebrew.


How can you install pdfimages in OS X El Capitan?

2 Answers 2

23

You can install via Homebrew with the following command:

brew install poppler
4
  • Can pdf2image be the same command as pdfimages? May 6, 2016 at 9:21
  • @Masi sorry my mistake. I update my answer.
    – jherran
    May 6, 2016 at 9:50
  • Can poppler be the same as pdfimages? May 6, 2016 at 13:47
  • 2
    Yes. The package contains pdfimages.
    – jherran
    May 6, 2016 at 13:48
9

Another command-line program that can extract bitmap images from PDF files is the command-line version of the Unarchiver app called 'unar'. (Doesn't need Homebrew or anything to install.) The command is simply unar filename.pdf

http://unarchiver.c3.cx/commandline

(The original GUI-based Unarchiver.app does this as well.)

3
  • Do you have any idea how well Unar does with vector images? May 6, 2016 at 13:48
  • Unar doesn't convert vector to bitmap images, nor does it save individual document pages. May 6, 2016 at 15:54
  • @LéoLéopoldHertz준영 You can "extract" any vector data from a PDF on macOS using the built-in Preview.app! Open the "thumbnails" sidebar that shows miniatures of the pages, select the page containing the graphic you are interested in, Cmd+C, then Cmd+N. You now got a copy of that page. Now crop it using "Tools -> Rectangular Selection", select your graphic, then "Tools -> Crop" (or Cmd+K). Save as PDF, done! Optionally, you can feed this to the command line tool pdfcrop which will crop any remaining space around it. It doesn't get much better than that!
    – phdoerfler
    Mar 19, 2022 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .