Page 1 of 1

jpg to pdf conversion changes the image dimension

Posted: 2012-04-25T07:53:38-07:00
by ma1
Hi,

I am using convert to convert multiple jpg images into a single pdf. The pdf file is crearted but the dimension of image in pdf is different from the original image.
I want to keep the original jpg image dimension in the resulting pdf.

What should i do to achive the above?

I am using Fedora 16 and the conver version is
#convert -version
Version: ImageMagick 6.7.0-10 2011-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP


Regards,

Re: jpg to pdf conversion changes the image dimension

Posted: 2012-04-25T09:26:22-07:00
by fmw42
PDF is vector format and so I believe it requires you to set a density so that the PDF "image" will match what you want with the JPG

try

convert image.jpg -density XX image.pdf

specify XX as dpi or dpc, you can add -units pixelsperinch or pixelspercentimeter

see
http://www.imagemagick.org/script/comma ... .php#units
http://www.imagemagick.org/script/comma ... hp#density

Re: jpg to pdf conversion changes the image dimension

Posted: 2012-04-25T13:54:11-07:00
by ma1
fmw42 wrote:PDF is vector format and so I believe it requires you to set a density so that the PDF "image" will match what you want with the JPG

try

convert image.jpg -density XX image.pdf

specify XX as dpi or dpc, you can add -units pixelsperinch or pixelspercentimeter

see
http://www.imagemagick.org/script/comma ... .php#units
http://www.imagemagick.org/script/comma ... hp#density
Great Great Thanks for your help....now pdf is generated with correct image dimensions.
:D

Re: jpg to pdf conversion changes the image dimension

Posted: 2012-04-25T13:59:20-07:00
by fmw42
Out of curiosity what density did you use to get the right size? Your question has been asked before on the forum and a similar answer provided, but no one bothered to reply with what density they found that worked.