Convert a PDF File to PNG or JPG With Imagemagick on Mac
Published: Feb 10, 2020
Updated: May 3, 2021
Updated: May 3, 2021
I needed to convert some large PDF files into images for my wife. All of the free online converters had a file size limit of around 25 MB… but the files I was working with were a few hundred MB. Once again, Imagemagick comes to the rescue. Here’s how to do it:
Setup #
-
Install Homebrew
-
Install Imagemagick
brew install imagemagick
-
Check that the version is
7.0.9-21
or highermagick --version
-
Install Ghostscript, which allows Imagemagick to convert from PDFs
brew install ghostscript
-
Check that the version is
9.50
or highergs --version
Convert #
# PDF to PNG
magick file.pdf file.png
# PDF to JPG
magick file.pdf file.jpg