I have an image
foo.png which is 1240 * 1754 pixels.
Using imagemagick on OS X, I convert this to a .pdf and specify the resolution to be 150 dots per inch, so its physical format will be exactly an A4 sheet:
convert -units PixelsPerInch -density 150 foo.png bar.pdf
However, if I now check the resolution of the resulting file:
identify -verbosy bar.pdf | grep Resolution
Note: the image should not be scaled or resized or anything. It's 1240 * 1754 and should stay that way. I just want to make sure the PDF covers exactly one full A4 sheet, which is the case with these pixel dimensions at 150 dpi.
How do I make sure the resulting .pdf file has the right resolution?
(Edit) Come to think of it, I realize that perhaps a PDF document (even if it's just a single page) doesn't necessarily have one overall dots per inch or resolution setting.
In this case I'm creating a PDF out of one image, but in general, a PDF can contain many elements, possibly all with different resolutions.
So I'm wondering, maybe with my approach I'm only setting the dpi for just this image, but the
Resolution that is reported by
identify -verbose bar.pdf is something else entirely?