Easy way to combine pdf files into one
This is a bit of a techie post, but I wanted to document how I do this since it seems to come up once or twice a year and I always forget the steps.
I had to submit a form via email to get reimbursed for my flex spending account and had to include scanned copies of my receipts. I wanted to send this as one file, but couldn’t remember how to combine the tiff files that my scanner software generated into one file. If you do a google search, you end up finding little utilities for windows or a tutorial of how to use Adobe Acrobat to accomplish this. Using a mac or linux machine, this is pretty straightforward with some free software.
You need ImageMagick and ghostscript installed. For the mac, the easiest thing is to use the wonderful Darwin ports to do this. To do this with ports is easy:
$ sudo port install ImageMagick ghostscript
Then, if you have tiff files (or other formats) from your scanner you want to convert them to pdf. This is easy using the ImageMagick convert tool. For example:
$ convert filename.tiff filename.pdf
The convert command determines the format based on the file suffix, so this will convert the tiff file to a pdf. It really is a swiss army knife of tools and this is just one of the most basic things you can do with it.
Then, take the multiple pdfs and combine them into one using ghostscript:
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=combined.pdf file1.pdf file2.pdf
Tada!
Leave a Reply
No Comment
Be the first to respond!