Page 1 of 1

Imagemagick use-trimbox doesn't work at all

Posted: 2011-01-17T04:23:14-07:00
by basstradamus
Hello,

I'm desparately trying to convert PDF to JPG by Imagemagick (convert command) preserving trimbox. I run following command (convert only first page).

convert -verbose -define pdf:use-trimbox=true "test_org.pdf[0]" cropped.jpg

Here is an output. Looks like imagemagick doesn't pass use-trimbox parameter to the ghostscript. May that be a reason? As at the moment converted image is mediabox size, not trimbox. Version of ImageMagick is 6.0.7, ghostscript GPL Ghostscript 8.64.

convert: "gs" -q -dBATCH -dSAFER -dMaxBitmap=500000000 -dNOPAUSE -dAlignToPixels=0 "-sDEVICE=bmpsep8" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-g652x935" "-r72x72" -dFirstPage=1 -dLastPage=1 "-sOutputFile=/tmp/magick-XXgTtZZG" "-f/tmp/magick-XXs4Kjq2" "-ftest_org.pdf". /tmp/magick-XXgTtZZG[0] BMP 652x935 PseudoClass 256c 2.3mb 0.050u 0:01 /tmp/magick-XXgTtZZG[1] BMP 652x935 PseudoClass 256c 2.3mb 0.040u 0:01 /tmp/magick-XXgTtZZG[2] BMP 652x935 PseudoClass 256c 2.3mb 0.020u 0:01 /tmp/magick-XXgTtZZG[3] BMP 652x935 PseudoClass 256c 2.3mb 0.010u 0:01 test_org.pdf PDF 652x935 652x935+0+0 DirectClass 2.3mb 0.040u 0:01 test_org.pdf PDF 652x935 652x935+0+0 DirectClass 2.3mb 0.040u 0:01 test_org.pdf=>cropped.jpg PDF 652x935 652x935+0+0 DirectClass 202kb 0.120u 0:01

Re: Imagemagick use-trimbox doesn't work at all

Posted: 2011-01-17T07:17:53-07:00
by magick
Can you post a URL to the PDF that contains a trimbox. We need to reproduce the problem with your PDF before we can comment.