Top
PDFelement
PDFelement: PDF Editor, Scanner
Edit, Convert, Annotate PDF
Edit, Annotate PDF
OPEN OPEN
Home > PDF Images > How to Convert PDF to PNG on Linux

How to Convert PDF to PNG on Linux

author name

2024-04-30 11:02:37 • Filed to: PDF Images • Proven solutions

Converting PDF to PNG on Linux can prove a tough assignment. There are scores of people out there desperate for a solution for Linux PDF to PNG conversion. If you are one of them then count yourself lucky. This article will guide you through a detailed procedure on how to convert your PDF to PNG on Linux.

Use Pdftoppm to Convert PDF to PNG in Linux

In this section, we are going to see how to convert PDF to PNG on Linux using the pdftoppm command line. This is part of the Linux package poppler/poppler-utils/poppler-tools. However, it depends with your Linux distribution. The following steps illustrate the PDF to PNG conversion process.

Step 1. Install the pdftoppm package for linux as follows.

pdf to png linux

Step 2. To convert the entire PDF into JPG format, run the command below. In this case, our PDF file is document.pdf

linux pdf to png

To convert a range of PDF pages, simply include the –f N – l N instruction. Where f N stands for the first page to be converted while l N stands for the last page to be converted. To convert from page 5 to page 15, run the following command.

linux convert pdf to png

Step 3. Change the PNG resolution if you want. By default, images will have a DPI of 150. If you're going to increase the resolution, simply include the –rx and –ry commands. To create an image of 300 DPI, use the code below.

convert pdf to png linux

Use Imagemagick to Convert PDF to PNG in Linux

Another tool to convert PDF to PNG in Linux is ImageMagick. This is another utility to process images, including converting PDF to PNG.

Step 1. Install ImageMagick using the command "sudo apt install ImageMagick".

Step 2. When you are done installing, you can convert the PDF files to a PNG image using the command line: convert sample.pdf output_image.jpg.

PDF to PNG with Imagemagick

Tip: If you notice that the PDF file conversions aren't authorized by the policy, go over to the ImageMagick policy XML file using the command- sudo nano /etc/ImageMagick-6/policy.xml. Then press Ctrl+O and Ctrl + X to edit the disable ghostscript format types code. Then you have to run the command line to convert PDF to PNG.


How to Convert PDF to PNG on Windows and Mac

Wondershare PDFelement - PDF Editor is our top pick solution to convert PDF to JPG on both Windows and Mac. The program provides a simple and straightforward interface that makes the entire conversion process fascinating. It supports a wide range of image formats and different other file formats, including the latest hot formats. If you are a newbie, there is no need to get cold feet because the interface is a total no-brainer. This means you will walk through the conversion process without the need for help. One cool thing about PDFelement is that it supports nearly all operating systems and devices and that it offers more than one seamless ways to convert PDF files to and from other formats. Other features include:

  • Edit PDF contents like texts, links, and images.
  • Add comments, text markups, drawings, and highlights to PDF contents.
  • Perform OCR in scanned PDFs to enable editing and searching of its contents.
  • Perform the batch conversion and creation.
  • Compress PDFs to the desired size without quality loss.
  • Protect PDFs with the help of passwords and redaction features.
  • Create interactive forms manually or automatically.
  • Share converted PDF with the help of email, Dropbox, and Google drive, etc.

On Windows:

Step 1. Open PDF

Double click the program icon on your device to run the program. On the primary window, select the "Open File" link located at the bottom left of the window. The application will display the file explorer window to allow you to browse for the target PDF file. Choose the PDF file and click the "Open" button. The PDF will be uploaded to the program window.

png to pdf linux

Step 2. Click "To Image"

Move your cursor to the toolbar and select the "Convert" tab. You will be presented with a number of output format categories. Ignore the rest and select the "To Image" option.

ubuntu pdf to png

Step 3. Convert PDF to PNG on Windows

In the next window, you will be required to choose the destination folder. Select the desired output folder and provide a suitable file name for the png file that will be created. Now click the "Save as type" button and choose "Image Files (*.png)" from the formats displayed. Finally, hit the "Save" button to convert PDF to PNG on windows.

ubuntu convert pdf to png

On Mac:

Step 1. Open PDF

Launch PDFelement on your Mac to display the main window. At the bottom of this very window, click the "Open File" link, and you shall be directed to the file explorer window. Navigate and select the PDF file you want to convert to PNG. Click "Open" to import it to the program window.

pdf to png linux

Step 2. Select PNG as Output Format

When the PDF file is successfully imported, go to the "File" tab and choose "Export To" from the drop-down list. Under the "Export To" drop-down menu, select the "Image" format to access a list of supported image formats. Locate and select the "PNG” option from the list.

linux pdf to png

Step 3. Convert PDF to PNG on Mac

You will now be redirected to the output window. Choose a convenient save path and click the "Save" button to trigger the conversion of PDF to PNG.

linux convert pdf to png

Convert PDF to PNG - FAQs

How to convert multiple PDFs to PNG in Linux?

To batch convert PDF to PNG in Linux, you need a simple command. Open the terminal and CD to the directory that contains the files that you have to convert. Once you are inside the directory, you can copy and paste or type the following command "find . -maxdepth 1 -type f -name '*.pdf' -exec pdftoppm -png {} {}". And, all your PDF pages will be converted to PNG images.

How to convert PDF to PNG in Linux in high resolution?

You can set DPI when converting PDF to PNG with Pdftoppm. By default, the tool converts PDF to PNG in a resolution of 150 DPI. To set a higher DPI, you can use the following command line.

$ pdftoppm -png -rx 300 -ry 300 Linux_For_Beginners.pdf Linux_For_Beginners

In this example, the PDF file Linux_For_Beginners is set to convert to PNG in 300dpi

How to convert PDF to PNG on Ubuntu?

Ubuntu is one of the most popular Linux-based operating systems. You can use tools like Pdftoppm or Imagemagick to convert PDF to PNG on Ubuntu Linux.

Free Download or Buy PDFelement right now!

Free Download or Buy PDFelement right now!

Buy PDFelement right now!

Buy PDFelement right now!


author name

Audrey Goodwin

chief Editor

Speak Your Mind

Register / Login then write your review
user
{{item.name || userName}}
{{item.time}}
{{item.message}}
{{item.likes}} Cancel Reply Reply
Register / Login then write your reply
user
{{item1.type == 2 ? authName : item1.name ? item1.name : userName}}
{{item1.time}}
@{{item1.reply_to_type == 2 ? authName : item1.reply_to_name ? item1.reply_to_name : userName}} {{item1.message}}
{{item.likes}} Cancel Reply Reply
Register / Login then write your reply