Page 1 of 1
convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-10-30T13:33:45-07:00
by stephan0h
Hi,
I'm using imagemagick's convert-command for converting pdf-files to jpeg.
My machine runs on linux, it has 4GB RAM and a core dual processor.
Now I've got a quite big pdf which I want to convert: 180*180 cm with 300 dpi. I want to convert this to a jpeg file of approximately 20000*20000 pixels. I admit this is huge.
I let the convert statement run for 8 hours and then I hit <ctrl>+c. The cpu was nearly idle and the hard disk was working like hell. So apparently I crossed the limits of imagemagick?
Any ideas of what I can do?
thanks,
stephan
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-10-30T14:53:57-07:00
by fmw42
perhaps see
http://www.imagemagick.org/Usage/files/#massive as you may be running out out memory
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-10-30T15:15:41-07:00
by magick
Try converting the first page:
- convert 'image.pdf[0]' image.jpg
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-11-01T04:15:39-07:00
by stephan0h
magick wrote:Try converting the first page:
- convert 'image.pdf[0]' image.jpg
Thanks for the hint - but this pdf consists only of one page
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-11-01T05:12:14-07:00
by stephan0h
Thanks for pointing me there. I was now successful using:
Code: Select all
convert -limit area 8192 -limit memory 8192 -density 300 khm6.pdf khm6.jpg
It finished in less than 10 minutes! Great!
I also tried the stream-command like:
Code: Select all
stream -density 300 khm6.pdf khm6.jpg
This also worked fast - but the resulting files where not readable. Why is that?
thanks,
stephan
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-11-01T19:33:03-07:00
by anthony
stephan0h wrote:
I also tried the stream-command like:
Code: Select all
stream -density 300 khm6.pdf khm6.jpg
This also worked fast - but the resulting files where not readable. Why is that?
Stream only outputs raw RGB data. You need to pipe that into a convert command with the right size information to convert back to a more normal image file format.
Stream is typically used to extract a portion (crop) of the input image which is then processed.
Re: convert huge pdf to jpeg -> ultraslow performacne
Posted: 2011-11-02T01:26:59-07:00
by stephan0h
thanks for clearifying!
regards,
stephan