Imagemagick use-trimbox doesn't work at all

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
basstradamus
Posts: 3
Joined: 2010-02-11T07:54:13-07:00
Authentication code: 8675309

Imagemagick use-trimbox doesn't work at all

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.
Post Reply