Convert PDF to image on Ubuntu Linux using pdftoppm

If you want to easily generate an image file from a PDF document on Linux, you can do it from pdftoppm. pdftoppm is a free open source command line utility for Linux. You can use it to convert a PDF document to an image file. You can configure the file format, color filters such as grayscale, and the size of the output image. This command line tool comes with the poppler-utils package. It supports PNG, JPEG, JPEGCMYK, JPEGOPT, and TIFF file formats.


How to install pdftoppm poppler-utils on Ubuntu Linux

If it is not pre-installed on your Ubuntu-based distribution, open the terminal software (ctl + alt + t) and run the following commands one at a time.

sudo apt update
sudo apt install poppler-utils

How to convert PDF to image

You can convert a PDF to an image using the following command syntax:

pdftoppm -format document image

Here

Also read: FreeDink Action Role-Playing Video Game-Install FreeDink on Ubuntu.

format The extension of the output image file.Document The path to the PDF fileimage The name of the output image.

Example: Document Sample.pdf To download folder

First, go to the download folder.

cd Downloads

Then run the following command to convert sample.pdf to image.png. If the document has multiple pages, pdftoppm will add a number to the filename (for example, image-1 and image-2).

pdftoppm -png sample.pdf image

Then check the download folder.

pdftoppm output

For full usage details, run the following command:

pdftoppm -help

that’s it.

If you like this article, subscribe. YouTube channel. Also, twitter And Facebook..

..

Sidebar