I'm on Ubuntu 10.04 with imagemagick. I used this command:
convert myfile.pdf -density 300 file.jpg
This works well, but the JPGs are only about an inch high. How can I preserve the paper size in the conversion process?
|
I'm on Ubuntu 10.04 with imagemagick. I used this command:
This works well, but the JPGs are only about an inch high. How can I preserve the paper size in the conversion process? |
||||
|
|
You can set the -density before you read the source pdf, so you can do
and it'll read the pdf at 300dpi, then render out the jpg at the original size of the pdf, whatever that was. |
|||
|
|
|
I don't know if Imagemagick can sense the correct height automatically. However if you can come up with the correct height in pixel you can set the height manually. According to http://www.indigorose.com/forums/archive/index.php/t-13334.html an A4 paper has the height of 3508 pixels in 300 dpi so then you can do
This command sets the width to 3508 pixels and preserves aspect radio. See http://www.imagemagick.org/script/command-line-processing.php#geometry for details on the |
|||||||
|