I have a image of dimension 1400x800, which I need to convert to a PDF so that the PDF is in in Portrait form & contains the image in top/bottom half of the page. I need to use ImageMagick 6.4.8 2009-09-21 as that is the only available on my production server. Cannot use Ghostscript.
Image Details
Code: Select all
>identify sample.gif
sample.gif GIF 1400x800 1400x800+0+0 8-bit PseudoClass 256c 29.3kb
Here are some of the options that I tried:
Code: Select all
convert -bordercolor none -border 100x100 -page Letter -density 72 sample.gif -resize 792x612\! sample.pdf
convert -bordercolor none -border 100x100 -page Letter -density 72 sample.gif -resize 612x792\! sample.pdf
convert -density 72 -size 1400x800 sample.gif -page Letter -density 72 -resize 504x288 -bordercolor none -border 11%x14% sample.pdf
Note: I have to do this in a program so need a command based solution using convert.