Page 1 of 1
convert pdf->jpg is too slow. why?
Posted: 2008-01-11T09:46:15-07:00
by scofer
I tried to convert PDF file (~1-2 MB) and it took ~ 30 min. why?
I have fast computer (p4 2.4 GHz, 1G RAM). What's the reason?
May be it would be faster if i will convert PDF to PNG or GIF?
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-11T12:07:57-07:00
by scofer
Anybody know the reason?
Maybe I should convert to another extension?
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-11T12:48:25-07:00
by magick
How many pages does your PDF image have? If its many, chances are the images are being cached to disk which is 1000 times slower than in-memory caching. To fix, use Ghostscript from the command line which should speed up processing significantly.
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-12T09:21:32-07:00
by scofer
Maybe I should convert to different extension, i.e. GIF or PNG. Will it be faster?
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-12T11:15:10-07:00
by scofer
For example:
i convert PDF file (~20MB) to JPEG with Adobe Acrobat (it takes ~5 min).
With ImageMagick it takes more than 1 hour (!!!)
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-12T11:18:05-07:00
by scofer
magick wrote:How many pages does your PDF image have? If its many, chances are the images are being cached to disk which is 1000 times slower than in-memory caching. To fix, use Ghostscript from the command line which should speed up processing significantly.
~ 100 pages.
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-12T11:36:04-07:00
by magick
That's the problem. The 100 pages are first cached to memory and when memory is exhausted they are cached to disk. Using Ghostscript directly from the command line is the most promising method of speeding up the conversion.
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-12T13:49:56-07:00
by scofer
magick wrote:That's the problem. The 100 pages are first cached to memory and when memory is exhausted they are cached to disk. Using Ghostscript directly from the command line is the most promising method of speeding up the conversion.
Thanks. I will try and report about result
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-17T04:13:11-07:00
by astroturf
I found this thread from searching. What exactly did you mean by using ghostscript from the command line? I thought ImageMagick did the actual converting. Is ghostscript capable of outputing images? I tried to look at their docs but they were down
.
Can you provide an example? I have a 1000+ page document that is nearly impossible to work with using convert.
Sorry to post in your thread scofer.
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-23T02:53:37-07:00
by anthony
An example in in IM examples, under Text to Image, Postscript...
http://imagemagick.org/Usage/text/#postscript
Near the end of that part, just before the nest section on "draw text".
Also you can remove all but the first page wanted from the postscript before feedding the postscript to IM that way IM only has to convert one page.
Re: convert pdf->jpg is too slow. why?
Posted: 2008-01-24T11:16:09-07:00
by astroturf
Thank you very much. Just what I needed.