[magick-users] convert-probem with a large PDF
Sascha Emondts
se at brainbits.net
Thu Apr 3 20:05:20 PST 2003
Hi Lars,
yes, I know this way, but I don't understand why I am able to convert a
single page via ImageMagick form a document with 10 pages without any
problem, but when I try exactly the same thing with a 700pages document I
get 7 files.
And I think this page-option ([0]) is passed from convert because it is very
fast when I say [0] in order to get the first page, but when I don't say [0]
it's extremly slow.
BTW: I work in a PHP-script with exec() and I try to convert the 700-pages
PDF to JPG via
<?
exec("gs -sDEVICE=jpeg -sOutputFile=test.jpg -dFirstPage=1 -dLastPage=1
Bug691.pdf");
?>
While I do this, I get a very busy gs-process with ~80%cpu for minutes. When
I try exactly the same command directly from the shell, it will take only a
few seconds with lesser than 5%cpu. Does anybody knows what's that?
Bye,
Sascha
>>-----Original Message-----
>>From: Lars Ruben Skyum [mailto:lars.skyum at stibo.com]
>>Sent: Thursday, April 03, 2003 5:41 PM
>>To: 'Sascha Emondts'; 'magick-users at imagemagick.org'
>>Subject: RE: [magick-users] convert-probem with a large PDF
>>
>>
>>I'm using gs 8.0 and that requires options -dFirstPage=1 and
>>-dLastPage=1 to convert only the first page. I don't think
>>these options are passed from convert, not even if you add
>>the -page option to convert. Perhaps you need to run gs in a
>>separate step before convert to get this right.
>>
>>/Lars
>>
>>> -----Original Message-----
>>> From: Sascha Emondts [mailto:se at brainbits.net]
>>> Sent: 3. april 2003 17:13
>>> To: 'magick-users at imagemagick.org'
>>> Subject: [magick-users] convert-probem with a large PDF
>>>
>>>
>>> Hi,
>>>
>>> I have a very large PDF-file (6MB with more than 700 pages).
>>> Here is what I do:
>>> convert large.pdf[0] thumb.jpg
>>> in order to get a JPEG from the first page.
>>>
>>> This are the files that imagemagick gives to me:
>>> thumb.jpg.0
>>> thumb.jpg.1
>>> thumb.jpg.2
>>> thumb.jpg.3
>>> thumb.jpg.4
>>> thumb.jpg.5
>>> thumb.jpg.6
>>>
>>> When I try the same thing with a smal PDF with only a few
>>> pages, I only get
>>> one "thumb.jpg".
>>> Does anybody know what's this and what I can do in order to
>>> avoid this?
>>>
>>> System:
>>> - Debian 3
>>> - Ghostscript 6.53
>>> - ImageMagic 5.4.4
>>>
>>> Bye,
>>> Sascha
>>> _______________________________________________
>>> Magick-users mailing list
>>> Magick-users at imagemagick.org
>>> http://studio.imagemagick.org/mailman/listinfo/magick-users
>>>
>>
More information about the Magick-users
mailing list