convert *.png to letter.pdf

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mikeg9b
Posts: 1
Joined: 2013-03-05T17:19:55-07:00
Authentication code: 6789

convert *.png to letter.pdf

Post 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.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: convert *.png to letter.pdf

Post 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"
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply