Ubuntu – Convert PDF to image

conversionconvertjpegpdf

I'm trying to convert a PDF file (it's a book) into an image.

When I using convert like this

convert book.pdf book.jpg

or like this

convert book.pdf book.png

then I get this warning

Warning: Short look-up table in the Indexed color space was padded with 0's

for each page.

Is there some other tool I can use for conversion to get a bunch of images for this, or can someone show me a different way to solve this problem?

Best Answer

One different way would be GhostScript:

gs -dNOPAUSE -dBATCH -sDEVICE=jpeg -r96 -sOutputFile='page-%00d.jpg' input.pdf

where -r96 is desired dpi resolution

Output are multiple JPEG images.

You can generate transparent PNGs also if you wish:

gs -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r96 -sOutputFile='page-%00d.png' input.pdf
Related Question