resolution of PDF files forced to 72x72 even when -density is used
Posted: 2018-03-04T08:35:50-07:00
I have a 600 dpi PBM file, and I simply want to wrap in a PDF with no changes. I would expect this to work, but it gets downsampled to 72x72:
So I also tried to brute-force it to maintain the 600 dpi:
I also tried replacing "-density" with "-resample" in the above attempt and same result. I'm first wondering if perhaps it's correct, and the "identify" command is lying when it comes to PDF containers. So I tried extracting the images:
The first bizarre finding is that the extracted images are JPG, considering the input images were pbm and no changes should be made to them. Then the next astonishment is that these JPG images have no resolution (yet they display just fine). However, in the GUI tool that displays the JPG, the properties are said to be 300 dpi.
Code: Select all
$ convert source.pbm target.pdf
$ identify -verbose target.pdf | grep -i reso
Resolution: 72x72
Code: Select all
$ convert -units pixelsperinch source.pbm -density 600 target.pdf
$ identify -verbose target.pdf | grep -i reso
Resolution: 72x72
Code: Select all
$ pdfimages -all target.pdf img
$ identify -verbose img-000.jpg | grep -i reso
<no output>