Page 1 of 1

-define PDF:use-cropbox-true doesn't recognize cropbox

Posted: 2006-08-01T13:43:04-07:00
by donovaly
Take the following two PDF-files:

http://fkurth.de/uwest/usti/PGMEA.pdf
http://fkurth.de/uwest/usti/PGMEA-2.pdf

and convert them with the following command to a PNG:

convert -define pdf:use-cropbox=true PGMEA.pdf PGMEA.png

The file PGMEA-2.pdf is in PDF format 1.4 and Imagemagick correctly recognized its cropbox.
But the file PGMEA.pdf is in PDF format 1.2 and Imagemagick ignored or didn't recognized its cropbox so that the resulting PNG is too large, see the results:

http://fkurth.de/uwest/usti/PGMEA.png
http://fkurth.de/uwest/usti/PGMEA-2.png

I'm using Imagemagick 6.2.8-7.

Posted: 2006-08-01T16:02:22-07:00
by magick
PGMEA.pdf does not contain a cropbox.

Posted: 2006-08-01T17:02:46-07:00
by donovaly
magick wrote: PGMEA.pdf does not contain a cropbox.


Sorry I misspelled, both images have a mediabox with exactly the size of the drawing:

/MediaBox[0 0 124 78]

Open both PDFs with Adobe Reader or GSview and you'll see that they are displayed the same.
The bug is that Imagemagick doesn't take care of the PDF size in case of the PDF in format 1.2. Ghostscript (8.54) handle both files correctly.

Posted: 2006-08-01T17:03:48-07:00
by donovaly
magick wrote: PGMEA.pdf does not contain a cropbox.


Sorry I misspelled, both images have a mediabox with exactly the size of the drawing:

/MediaBox[0 0 124 78]

Open both PDFs with Adobe Reader or GSview and you'll see that they are displayed the same.
The bug is that Imagemagick doesn't take care of the PDF size in case of the PDF in format 1.2. Ghostscript (8.54) handle both files correctly.

Posted: 2006-08-01T17:10:01-07:00
by donovaly
I just realized that this bugdoesn't occur when I omit the PDF crop box option and simply use the command

convert PGMEA.pdf PGMEA.png

But I need the cropbox option for my other PDF-images and use only one script to convert them automatically.

Posted: 2006-09-02T04:57:44-07:00
by donovaly
This bug still occurs with Imagemagick 6.2.9-2.