Wednesday, August 31, 2011

How to merge several pdf files for printing

I have 20 pdf files to print. Is there a way to print all of them once, resulting in the same printouts as if I have printed them separately? I could use pdftk to combine the pdf files into one single pdf file, but some files have odd number of pages, which results in pages from two files printing on the same sheet of paper.

The solution is to pad an empty page to those files with odd number of pages, and then use pdftk to combine the pdf files. Here is the script (the file "emptypage.pdf" is just an empty page, and can be created using LaTeX).

No comments: