0

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

it says:

Resolution: 72x72

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?

  • Open the page in Acrobat Pro, and then use the Object Inspector, which is part of the Print Production tools. – Max Wyss Jun 4 '16 at 0:02
  • @MaxWyss Thanks, but unfortunately I don't have Acrobat. – RocketNuts Jun 4 '16 at 10:51
0

Try this:

convert foo.png -page A4 bar.pdf
  • Same result, unfortunately. It still says Reslution: 72x72. I noticed that the output of identify -verbose bar.pdf also shows: Geometry: 595x842+0+0 and Page geometry: 595x842+0+0 (both with your command as well as mine). Not sure what that means? – RocketNuts Jun 4 '16 at 10:49
  • Does your image fit into A4 page this method or your method? – Serge Jun 4 '16 at 12:10
  • I'm not sure, how do I check? By looking at the identify -verbose result, the Geometry doesn't like anything related to A4, and neither does the 72x72 resolution. – RocketNuts Jun 4 '16 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.