Oct 17

Combining two or more PDFs into one, on Linux

Category: Linux   — Published by goeszen on October 17, 2016 at 11:40 am

The most elegant, open-source and completely free solution: use ghostscript.

$ gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf inputfile1.pdf inputfile2.pdf

ghostscript (gs) is pre-installed on most Linux distributions.

Learn about Merging multiple pdf files and jpg files into one PDF in this related post where files of different types (JPGs and PDFs) are merged into one PDF.

On Windows:
If you're on Microsoft Windows, have a look at pdftk, which I found via this discussion.