PDFs that were used as source for printed media usually contain a bounding box with instructions for the printing facilities. If you open a PDF in a normal PDF Viewer, you don't see that extra white space around the page.
However if you use ImageMagick to convert a PDF (containing bounding box) to JPG, the JPG contains the white border.
How do you get rid of this bounding box?
Just as a hint: If you open a PDF in Adobe Photoshop you can choose the option "Crop to Bounding Box", that option I would like to use in ImageMagick but don't know how.
ImageMagick has two options that allow you to use the CropBox or the TrimBox of your PDF document. I am not sure which one is the same as the bouding box in photoshop but you can use it like this:
convert -define pdf:use-cropbox=true -density 300 input.pdf output.jpg
convert -define pdf:use-trimbox=true -density 300 input.pdf output.jpg
Other PDF specific options can be found here: http://www.imagemagick.org/script/formats.php (scroll down to PDF)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With