Page 1 of 1

Convert PDF to BMP with different size

Posted: 2014-03-07T07:21:28-07:00
by aikiaviator
Hi,

I am very new at this and as such I am very much just fumbling around. My requirement is to generate a BMP of the size 640x982 pixels from a PDF of disproportional height and width.

The conversion in proportion is 640x909. But I need it to be set to the 640x982 BUT maintaining the original image size. In other words extended down with blank fill.

I am using the command line editor for this and have come up with the following, however, can't quite get the final stretch.

convert -density 119x119 -resize 640x982^ c:\AFS_Charts\PDF\MMBGN01-136.pdf -colors 256 -compress None -colorspace RGB -format PNG c:\AFS_Charts\BMPS\MMBGN01-136.png
convert c:\AFS_Charts\BMPS\MMBGN01-136.png -colors 256 -compress None -colorspace RGB -format BMP3 c:\AFS_Charts\BMPS\MMBGN01-136.bmp

Any help is greatly appreciated.

Re: Convert PDF to BMP with different size

Posted: 2014-03-07T08:06:13-07:00
by snibgo
aikiaviator wrote:In other words extended down with blank fill.
Perhaps you want "-extent 640x982".

See http://www.imagemagick.org/script/comma ... php#extent

Re: Convert PDF to BMP with different size

Posted: 2014-03-09T04:03:12-07:00
by aikiaviator
Thanks worked a treat with some minor other changes.