This article will be showing you how to convert the pages of a PDF document to image files (PNG, JPEG, and others) using the GIMP tool in Linux.
GIMP is a free, open-source, fully-featured image editing tool, available for Windows, Linux, Mac OS X, and other platforms. It can export pages of PDF documents to various image formats, including PDF, JPEG, TIFF, BMP, and many others.
These instructions explain how to use GIMP to convert PDF for those that prefer to use a graphical application to accomplish the task. GIMP exports PDF pages one by one therefore requires a plugin to export all pages automatically.
First of all, if you don’t already have GIMP, you will need to install it using our following article:
On Fedora distribution, you can install GIMP, simply using the flatpak or snap as shown.
$ dnf install flatpak $ flatpak install flathub org.gimp.GIMP $ flatpak run org.gimp.GIMP OR $ sudo dnf install snapd $ sudo ln -s /var/lib/snapd/snap /snap $ sudo snap install gimp
Once installed follow the instructions below.
Convert PDF to Image using GIMP in Linux
First, we will start by converting one or a few PDF pages to PNG. This does not require adding any plugins to GIMP.
Click on the GIMP File menu, select Open, and choose the PDF file you want to convert. You will see an ‘Import from PDF’ dialog box. Set the Open pages option as Layers, and select Import.
In the GIMP layers dialog, scroll to the page you would like to convert from PDF to image. Drag the selected page with your mouse cursor to the top so it’s the first layer.
Next, click on the GIMP File menu, and select Export As. Now you can change the filename extension to the preferred image format by editing the name field at the top of the export dialog or click Select File (By Extension) at the bottom of the dialog.
You can also select where you wish to save your image on your computer in the Save in Folder section at the top of the dialog. Finally, click the Export button to save the file in the image format that you chose.
GIMP will pop up a dialog to make changes to your images such as compression level and image quality.
Hopefully, you can now convert your PDF docs to images in Linux using the GIMP application.
It’s pretty awesome now GIMP can save the multiple layers as multiple pages.
‘Export as’, file extension pdf, then tick both ‘layers as pages’ ‘to reverse the order of the pages.
It’s now my number one tool for annotating pdfs, especially useful for student texts.
I’ve been converting PDFs to JPGs for a while via GIMP, but I have been importing the PDFs as images, not as layers. Does it make any difference in the end result?
I use this feature quite a lot, opened your article in case there is some useful new tip. Like in the case of a PDF with multiple pages, imported as layers, an easy way to export each layer as a separate image.
Using the convert utility from ImageMagick is just a simple command:
I’m replying a couple of years late, but maybe it’ll help someone anyway. I’ve found that converting a pdf to a jpg looks MUCH better when using GIMP instead of the ImageMagick terminal command.
I’m actually saving spreadsheets as pdf, then converting the pdf to jpg. ImageMagick/command leaves ugly lines at the edges, while GIMP has a much cleaner look.
@Gary,
Thanks for the tip, hope it will be helpful for other Linux users…
Isn’t using ‘dnf‘ to install ‘snap‘ to install ‘GIMP‘ a roundabout way of doing things? Why not just use ‘dnf‘ to install GIMP? Or use ‘flatpak‘ which is native to Fedora/Red Hat?
@Dragonmouth,
The dnf install will give you an older version of GIMP, that’s why I used snap, but as per your suggestion, I have included flatpak as well…