Page 1 of 1

convert *.png to letter.pdf

Posted: 2013-03-05T17:37:45-07:00
by mikeg9b
I want to convert several .png files to one .pdf file. All the .png files are 300dpi scanned black and white documents (music notation). I have two problems:

1. I want the .pdf file to be Letter sized. Using convert -page Letter *.png letter.pdf resulted in a 4.36 x 5.87 inch .pdf.

2. The .pdf is larger than the total size of all the .png files. I want a .pdf that is the same size or smaller than the input files.

I'm using ImageMagick 6.7.7-10 2012-08-17 Q16 on the command line. I've been trying to figure this out on my own for at least a few years now. I've spent hours trying to make sense of the documentation and have never gotten it right.

Re: convert *.png to letter.pdf

Posted: 2013-03-14T17:05:16-07:00
by anthony
The resulting PDF will NEVER be smaller.

IM does not truely understand vector images like PDF. It is a raster image processor not vector.

The PDF's it generates are raster images that has a PDF wrapper around it. As such the PDF images will be the same same as the contained raster image, plus the wrapper code. There is however some options to PDF generation.
Specific compressions selection.

See IM Examples, Postscript and PDF
http://www.imagemagick.org/Usage/formats/#ps
and scroll down to "Postscript/PDF Output Options"