convert pdf to jpg in ubuntu

How to Convert PDF to Image/JPG in Ubuntu

Sometimes you may need to convert PDF to image or jpg files in Ubuntu. We will use ImageMagick utility to for this purpose. It is very useful and supports conversion of PDF to multiple image formats, not just JPG. Here are the steps to turn a PDF document to an image.

How to Convert PDF to Image/JPG in Ubuntu

Here are the steps to convert PDF to image/jpg in Ubuntu.

1. Install Imagemagick

Open terminal and run the following command to install imagemagick utility.

$ sudo apt-get install imagemagick

2. Convert PDF to JPG

Let us say you want to convert test.pdf file to test.jpg image. In this case, run the following command.

$ sudo convert test.pdf test.jpg

If you want to cusomize the quality of image, you can pass additional parameters as shown below.

$ sudo convert -density 300 -quality 100 test.pdf test.jpg

If you want to convert pdf document to other image formats such as png, just change the extension of output filename.

$ sudo convert test.pdf test.png

As you can see it is very easy to convert pdf documents to images/jpg.

Also read:

How to Redirect with Query String in Apache
How to Check Cookie is Set in Apache
How to Convert DocX to PDF in Ubuntu
How to Setup SSH Passwordless Login
How to Change NGINX User