Skip to main content

Convert a PDF file to PNG or JPG with Imagemagick on Mac

Published: 2020-02-10

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 #

  1. Install Homebrew

  2. Install Imagemagick

     brew install imagemagick
    
  3. Check that the version is 7.0.9-21 or higher

     magick --version
    
  4. Install Ghostscript, which allows Imagemagick to convert from PDFs

     brew install ghostscript
    
  5. Check that the version is 9.50 or higher

     gs --version
    

Convert #

# PDF to PNG
magick file.pdf file.png

# PDF to JPG
magick file.pdf file.jpg