PDF to JPG causes tons of white space and random placement?
Posted: 2016-04-22T20:12:58-07:00
I have several PDF files that seem to react quite differently when converted to a jpg. Essentially: they all generate with a ton of padded white space with the image placed randomly on the white canvas. Opening these PDFs do not display anything but the images centered. I have two samples of this behavior:
Using http://www.phdgaming.com/temp/pdf1.pdf, I get http://www.phdgaming.com/temp/image1.jpg that has the image in the top left of a large white canvas. The most basic command run for this (as more complex variations all failed) is:
Using http://www.phdgaming.com/temp/pdf2.pdf, I get http://www.phdgaming.com/temp/image2.jpg that has the image in the bottom right of a large white canvas. The most basic command run for this (as more complex variations all failed) is:
There are six total PDFs that are showing this behavior that I can't find a solution to after a few hours of searching. I'd appreciate any guidance that might help with this. (From what might be incorrect about the source PDFs, to how I could get the image to generate in the same place of the jpg, to how I could crop out the white background programmatically). Thanks in advance!
Oh - and my Image Magick version information:
Using http://www.phdgaming.com/temp/pdf1.pdf, I get http://www.phdgaming.com/temp/image1.jpg that has the image in the top left of a large white canvas. The most basic command run for this (as more complex variations all failed) is:
Code: Select all
convert pdf1.pdf image1.jpg
Code: Select all
convert pdf2.pdf image2.jpg
Oh - and my Image Magick version information:
Code: Select all
Version: ImageMagick 6.9.3-7 Q16 x86_64 2016-03-14 http://www.imagemagick.org
Delegates (built-in): bzlib djvu fontconfig freetype gvc jbig jng jp2 jpeg lcms lqr lzma openexr png tiff wmf x xml zlib