Sunday, May 28, 2023
rated 0 times [  690] [ 0]  / answers: 1 / hits: 385812  / 11 Months ago, tue, july 26, 2022, 5:12:46

I have requirement of converting PDF pages to images. There is a background image with some text in my file, and when I save it as an image only the background image gets saved.

Is there any software available for the same so that complete page can be converted to an image?

More From » software-recommendation


You can use pdftoppm from the poppler-utils package to convert a PDF to a PNG:

pdftoppm input.pdf outputname -png

This will output each page in the PDF using the format outputname-01.png, with 01 being the index of the page.

Converting a single page or a range of pages of the PDF

pdftoppm input.pdf outputname -png -f {page} -singlefile

Change {page} to the page number. It's indexed at 1, so -f 1 would be the first page.

If you'd like to work on a range of pages, you can also specify a number for the flag -l (last page), so having -f 1 -l 30 would specify the pages from 1 to 30.

Note again that .png will be appended to outputname automatically, so there's no need to include the extension. Also, -singlefile removes the -01 suffix cited above, since the output is known to have only one file.

Specifying the converted image's resolution

The default resolution for this command is 150 DPI. Increasing it will result in both a larger file size and more detail.

To increase the resolution of the converted PDF, add the options -rx {resolution} and -ry {resolution}. For example:

pdftoppm input.pdf outputname -png -rx 300 -ry 300

[#44485] Thursday, July 28, 2022, 11 Months  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 114
Total Questions: 130
Total Answers: 101

Location: Cook Islands
Member since Sat, Oct 16, 2021
2 Years ago
atchcommo questions
Fri, May 13, 22, 08:22, 1 Year ago
Wed, Mar 9, 22, 20:14, 1 Year ago