≡ Menu

How to Combine PDF documents on Linux

While preparing a proposal yesterday, I learnt a new way of merging multiple Portable Document Format (PDF) documents using a fairly old software package for Linux called pdftk. I installed pdftk and its dependencies on CrunchBang Linux, a Debian-based operating system, via Synaptic Package Manager.

I then placed all the files I wanted to merge in a directory called combinepdfs, which itself is located within the downloads directory. For illustration, let’s say I had three different PDF documents called pdf1.pdf, pdf2.pdf, and pdf3.pdf.

Go to the directory where the PDF files are.

~$ cd /home/andy/downloads/combinepdfs

To create one PDF file called bigpdf.pdf, enter the following:

~$ pdftk pdf1.pdf pdf2.pdf pdf3.pdf cat output bigpdf.pdf 

The merged PDF file will contain the individuals PDFs in the order that you placed them in the pdftk command above. In this example, pdf1.pdf will be on the first page(s) of bigpdf.pdf, followed by pdf2.pdf and pdf3.pdf.

Several years ago, I used Adobe Acrobat (on Windows XP) to do exactly the same thing. This is a far more elegant solution.

{ 0 comments… add one }

Leave a Comment