PDF: use-trimbox not working
Posted: 2009-03-09T04:52:51-07:00
Hi again,
I'm trying to convert pdfs and automatically crop the area outside the trimbox, but it's not working as expected.
My command (ImageMagick 6.2.4 02/10/07 Q16):
If i set -define pdf:use-trimbox=true nothing happens, the resulting image is showing the whole pdf:
result
So I copied the trim value to crop inside the pdf and tried:
This time the image is cut right, but it's still using the original page size resulting in a big white border:
result
So basically I have two questions:
* how do i get rid off the white border when using cropbox? did i miss a +repage or something?
* why doesn't use-trimbox work?
EDIT:
seems like -trim +repage will remove the white borders:
But I'm afraid this will remove parts of images which are starting white inside the trimbox.
I'm trying to convert pdfs and automatically crop the area outside the trimbox, but it's not working as expected.
My command (ImageMagick 6.2.4 02/10/07 Q16):
Code: Select all
convert -define pdf:use-trimbox=true -density 300 foo.pdf -resize 600 bar.jpg
result
So I copied the trim value to crop inside the pdf and tried:
Code: Select all
convert -define pdf:use-cropbox=true -density 300 foo.pdf -resize 600 bar.jpg
result
So basically I have two questions:
* how do i get rid off the white border when using cropbox? did i miss a +repage or something?
* why doesn't use-trimbox work?
EDIT:
seems like -trim +repage will remove the white borders:
Code: Select all
convert -define pdf:use-cropbox=true -density 300 -trim +repage foo.pdf -resize 600x bar.jpg