How to convert a PDF into JPG with command line in Linux?

Sören picture Sören · Mar 29, 2017 · Viewed 26.3k times · Source

What are fast and reliable ways for converting a PDF into a (single) JPEG using the command line on Linux?

Answer

janfitz picture janfitz · Mar 29, 2017

You can try ImageMagick's convert utility.

On Ubuntu, you can install it with this command:

$ sudo apt-get install imagemagick

Use convert like this:

$ convert input.pdf output.jpg
 # For good quality use these params
$convert -density 300 -quality 100 in.pdf out.jpg