jpg to pdf conversion changes the image dimension

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ma1
Posts: 2
Joined: 2012-04-25T07:38:28-07:00
Authentication code: 13

jpg to pdf conversion changes the image dimension

Post 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,
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: jpg to pdf conversion changes the image dimension

Post 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
ma1
Posts: 2
Joined: 2012-04-25T07:38:28-07:00
Authentication code: 13

Re: jpg to pdf conversion changes the image dimension

Post 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
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: jpg to pdf conversion changes the image dimension

Post 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.
Post Reply