Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
See this answer: – dAnjou Jan 9 '13 at 0:20
Or use GIMP as suggested in an answer on the same question – LiveWireBT Jul 3 '14 at 14:04
convert -geometry 1600x1600 -density 200x200 -quality 100 file.pdf file.jpg

When converting to jpg, you can use the -quality option. The "best" quality would be -quality 100.

There is a much simpler way to split multipage pdfs into a jpg:

convert -quality 100 -density 600x600 multipage.pdf single%d.jpg

    The -density option defines the quality the pdf is rendered before the convert > here 600dpi. For high quality prints you can increase that number.
    The %d just before the jpg suffix is for automatic numbering of the output pages 0,1,2...
    The -quality option defines the compression quality of the output jpg (0 min ... 100 max)
    The .jpg suffix defines the output format. You could use .png/.jpg/.pdf
share|improve this answer
This is working perfectly. Thank you – Geppettvs D'Constanzo Aug 29 '12 at 13:45

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
share|improve this answer
Very good method – Sabacon Feb 3 '12 at 13:36
+1 for not using imagemagick – TheHippo Aug 7 '12 at 14:16
How to make the background of the images white instead of transparent? – Rasoul Feb 4 '14 at 20:20
Don't use pngalptha device? – zetah Feb 4 '14 at 21:18
How to define width in this? Width needs to be defined and height needs to be auto based on aspect ratio. – Vivek Sancheti Mar 14 at 6:32

protected by Community Jul 4 '14 at 10:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.