Who hasn’t found himself in a situation where you have to make changes to multiple images and you get fed up with doing the job one image at a time? Well today I had to combine 13 images into a single pdf and it came out way to large to be useful.
First of all, you need to have installed imagemagick on your machine. To combine multiple files into one, you typeconvert *.jpg output.pdf
(this works for other filetypes too by the way)
Now instead of reducing the size and resolution (to keep the same paper size) of the images by 50% one by one, we add instructions to imagemagick. Let’s say our original images where from scans in 300dpi resolution and 2480 by 3508 pixels. We would runconvert -size 1240x1754 -density 150 *.jpg output.pdf
Now, instead of having a 20MB pdf, I got around 6MB, which I can send by e-mail without hassles for the receiving party. In preparing the jpg originals it would also have been useful to set the quality around 80.
If you get a pdf that doesn’t have normal page size, try and print it to file, creating a new pdf with selected paper size.
If you want to reduce an existing pdf you can get 300dpi, 150dpi or 72dpi with the following ghostscript command:gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=path/output.pdf path/input.pdf
where -dPDFSETTINGS=/ can be followed by preprint (300dpi), ebook (150dpi) or screen (72dpi).