Page 1 of 1

option "-define pdf:use-cropbox=true" partly broken

Posted: 2007-10-27T11:25:52-07:00
by donovaly
- Take a PDF-image in landscape format like this one:
http://fkurth.de/uwest/usti/Bilder/SpannungsTest1.pdf

- convert it to a PNG with IM 6.3.6-3 using this command:

Code: Select all

convert -define pdf:use-cropbox=true SpannungsTest1.pdf test1.png
As result you get an image that is cropped as if it would be in portrait format, see
http://fkurth.de/uwest/usti/Bilder/test1.png

- When you do the same with a PDF-image in portrait format:
http://fkurth.de/uwest/usti/Bilder/SpannungsTest2.pdf
you get a correct result:
http://fkurth.de/uwest/usti/Bilder/test2.png

(Perhaps this bug has been reintroduced?:
viewtopic.php?f=3&t=6206&start=0&st=0&sk=t&sd=a )

Re: option "-define pdf:use-cropbox=true" partly broken

Posted: 2007-10-27T11:28:11-07:00
by donovaly
I forgot to say that I have Ghostscript 8.60 installed (I don't think Ghostscript is the reason.)

Re: option "-define pdf:use-cropbox=true" partly broken

Posted: 2007-10-27T18:06:57-07:00
by magick
We grab the bounding box properly but unlike Postscript we cannot yet determine how to translate the PDF as required by the bounding box (for your image about -50,-50). For Ghostscript we inject the Postscript statement "-50, -50 translate". It may take awhile before we properly fix this problem for PDF.

Re: option "-define pdf:use-cropbox=true" partly broken

Posted: 2007-11-11T17:31:44-07:00
by donovaly
magick wrote:We grab the bounding box properly but unlike Postscript we cannot yet determine how to translate the PDF as required by the bounding box
I don't understand that this is a problem, because in ImageMagick versions from the beginning of this year the cropbox was correctly set independent from the paper orientation.

Re: option "-define pdf:use-cropbox=true" partly broken

Posted: 2008-02-25T13:17:32-07:00
by donovaly
We grab the bounding box properly but unlike Postscript we cannot yet determine how to translate the PDF as required by the bounding box (for your image about -50,-50). For Ghostscript we inject the Postscript statement "-50, -50 translate". It may take awhile before we properly fix this problem for PDF.
I don't know how and if you fixed this by intent, but with ImageMagick 6.3.8-11 this bug is fixed. Maybe due to the changes in ImageMagick 6.3.8-10:
Speed up converting large PDF/PS images when only selecting a few pages (e.g. pdffile.pdf[195-199]).