Page 1 of 1
Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T09:01:05-07:00
by stuporglue
I'm trying to convert a bunch of png files into a single pdf. All of the pngs are all 1424x1095.
The PDF is meant to be printed on 8.5x11 inch paper (Letter sized)
The command I'm running is:
Code: Select all
convert output/* -rotate 90 -page Letter output.pdf
The resulting PDF isn't letter sized, it's too small.
Code: Select all
pdfinfo -f 1 -l 5 output.pdf
---
Page 1 size: 370.286 x 479.193 pts
...
This page (
http://www.imagemagick.org/script/comma ... s.php#page) seems to say that "-page Letter" should be 612x792 postscript points
Any idea what am I doing wrong?
Here's the output of "convert --version"
Code: Select all
Version: ImageMagick 6.8.7-1 2013-10-19 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2013 ImageMagick Studio LLC
Features: DPC OpenMP
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr openexr pango pangocairo png png tiff x xml zlib
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T11:44:46-07:00
by fmw42
This works for me to get a pdf file that is 8.5x11. I am using IM 6.8.7.9 Q16 Mac OSX
logo: is 640x480
convert logo: -rotate 90 -page letter tmp2.pdf
Image: tmp2.pdf
Format: PDF (Portable Document Format)
Mime type: application/pdf
Class: DirectClass
Geometry: 612x792+0+0
Resolution: 72x72
Print size: 8.5x11
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T12:50:03-07:00
by stuporglue
Interesting. That works for me too, but the same command doesn't with my image. I even tried resizing it to 640x480 and the same thing still happens
Here's my page 001.png
http://stuporglue.org/downloads/001.png
Code: Select all
stuporglue@speed:~/src/printbook$ convert 001.png -rotate 90 -page letter output.pdf && pdfinfo output.pdf
...
Page size: 370.286 x 479.193 pts
Code: Select all
stuporglue@speed:~/src/printbook$ convert logo: -rotate 90 -page letter tmp2.pdf && pdfinfo tmp2.pdf
...
Page size: 612 x 792 pts (letter)
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T13:34:39-07:00
by fmw42
I presume it is because png density is specified as pixelspercentimenter and not pixelsperinch. The -page probably assumes units of pixelsperinch. This may or may not be a bug when dealing with PNG. However, whether a bug or not, it would seem to me that -page needs to be enhanced to account for units.
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T14:34:50-07:00
by stuporglue
That makes sense, I was able to play with the -page parameters and get the right dimensions.
It'd be nice if it were documen...oh, there it is.
http://www.imagemagick.org/Usage/resize/
"A "-units" setting (with arguments 'PixelsPerInch' or 'PixelsPerCentimeter') may be required in some situations to get this operator to work correctly.
This setting can also be important for output to Postscript and PDF image file formats."
This is the resulting command that worked:
Code: Select all
convert output/* -resize 3300x2550 -units 'PixelsPerInch' -density 300 output.pdf
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-12T16:09:36-07:00
by fmw42
Yes, that is the standard, long way to do it.
You could post a bug report about -page with pngs and see what the developers say.
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-13T09:01:20-07:00
by stuporglue
Thanks,
I filed a bug report.
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-13T10:54:18-07:00
by fmw42
stuporglue wrote:Thanks,
I filed a bug report.
I do not see any bug report on this.
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-13T13:36:39-07:00
by stuporglue
I submitted it here:
http://www.imagemagick.org/script/contact.php
Is that not the right place? I googled "imagemagick bug report" and that's what I got.
Re: Pngs to pdf with "-page Letter" : PDF is too small
Posted: 2013-12-13T15:24:19-07:00
by fmw42
Typically one just uses the Bugs forum at
viewforum.php?f=3. But that form is OK, too.