Convert PDF to PNG JPG in Ubuntu

March 12, 2017 | 0 Minute Read

In this post, we will see how to covert PDF files to high quality JPG PNG or any other formats in Ubuntu using ImageMagick.

This is a short tips copied from askubuntu answered by BinaryLife/Tim.

Install

First, install imagemagick

sudo apt-get install imagemagick

Convert

Convert the pdf using :-

convert -density 600 input.pdf -quality 100 output.png

Here, PNG, JPG or (virtually) any other image format can be chosen.
-density xxx</code> will set the dpi to xxx (common are 150, 300 and 600)
-quality xxx</code> will set the compression to xxx for PNG, JPG and MIFF file formates (100 means no compression)

–> all other options (such as trimming, grayscale, etc) can be viewed on the website of Image Magic.

Feel free to get in touch with the developers(not me!) if you get in trouble.