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.
-define PDF:use-cropbox-true doesn't recognize cropbox
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.
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.