How do I control PDF paper size with ImageMagick?

Viewed 32620

I have 16 jpg files which are around 920x1200 pixels (the widths slightly differ but heights are all 1200). I'm trying to join them into a pdf with:

convert *.jpg foo.pdf

But the resulting paper size is 1.53x2 inches. If I pass the arguments -page Letter, the page size ends up being a bewildering 1.02x1.32 inches. What is going wrong here? All of the information I can find suggests that this should work. I just want a document that consists of 16 letter-size pages.

4 Answers

According to this, 72 dpi is the default density => one dot per pixel (for a computer screen).

So you just need to specify -units pixelsperinch.

You can type the following command :

$ convert *.jpg -units pixelsperinch -page letter foo.pdf

BTW : If you want to use a non standard page size such as A4R for example, you must first determine the page size in dots (or pixels given at 72dpi) :

$ paperconf -s -p A4
595.276 841.89

Then the -page argument for A4R will be 842x595

Related