Page 1 of 1

PDF->JPG memory usage

Posted: 2010-11-22T12:08:51-07:00
by CptWacko
Hi all,

I have some trouble when I'm trying to convert large pdf to jpgs, IM uses way too much memory, something like 10gb for a 150 pages pdf. Is there any way to use a "normal" (1-2gb top) quantity of memory to do this thing ? I saw that stream.exe can read images line by line but when I try using it on a pdf with the same line that is in the examples, it tells me "missing an image filename".

So I guess my question is, is there anyway to split a pdf (or something like that) before processing so it takes less memory total ?

Thanks !

Re: PDF->JPG memory usage

Posted: 2010-11-22T12:33:20-07:00
by CptWacko
BTW, I cleared my source pdf while trying to use stream.exe on it, it says it's a 0 byte file afterwards. I don't know if that was a known issue so I'm posting it.

Re: PDF->JPG memory usage

Posted: 2010-11-22T12:33:52-07:00
by magick
You can convert a single page at a time:
  • convert 'image.pdf[0]' 0.jpg
    convert 'image.pdf[1]' 1.jpg
You can also force the entire PDF to disk rather than memory by adding -limit area 1 to your command line:
  • convert -limit area 1 large.pdf large.jpg

Re: PDF->JPG memory usage

Posted: 2010-11-22T13:25:19-07:00
by CptWacko
Thanks a lot man, your answer actually solved 2 of my problems.