Page 1 of 1
trouble converting PNG to PDF
Posted: 2015-10-09T00:15:37-07:00
by dowcet
Here is an example image. Call it input.png.
Here is the result I get from "convert input.png output.pdf".
Depending on the PDF viewer I use, the resulting PDF is either a) blank or b) displays at an
extremely high resolution, so that I have to zoom to less then 1% to read it. Setting "density" or resizing don't seem to matter. Any ideas?
Re: trouble converting PNG to PDF
Posted: 2015-10-09T01:24:14-07:00
by snibgo
"identify verbose" reports your png file has a resolution of 0.15 pixels per centimetre, so the total image is 80 metres wide and 115 metres tall.
Try changing it to a more sensible "-density" before conversion to pdf.
Code: Select all
convert WVuCk3x.png -density 100 -units pixelsperinch x.pdf
Re: trouble converting PNG to PDF
Posted: 2015-10-10T02:25:35-07:00
by dowcet
I see, thanks... Is there some kind of tutorial out there to help me understand what a sensible density setting is for a given image?
"identify verbose input.png" gives me a ton of output. "identify -verbose input.png | grep -i 'resolution'" gives me "Resolution: 0.15x0.15" but I have no idea what that means.
Re: trouble converting PNG to PDF
Posted: 2015-10-10T04:30:27-07:00
by snibgo
Identify -verbose says, near the top:
Code: Select all
Geometry: 1200x1721+0+0
Resolution: 0.15x0.15
Print size: 8000x11473.3
Units: PixelsPerCentimeter
A resolution of 0.15 PixelsPerCentimeter (which is 0.381 pixels per inch) means that each pixel is nearly 6 centimetres across, or 2.6 inches. So the 1200 pixels across the width of the image take 8000cm, or 80 metres, which is more than 240 feet. Some people want prints this massive, but most of us don't.
Computer screens are around 100 dots per inch (dpi). Home/office printers are often 600 dpi.
Most digital images have a sensible density setting, or none at all in which case software assumes a number like 72 dpi or 90 dpi.
Re: trouble converting PNG to PDF
Posted: 2015-10-10T23:46:56-07:00
by dowcet
That helps a lot... thank you, snibgo!