## How to concatenate (join) PDF files

Posted by Diego Assencio on 2013.11.24 under Linux (Shell)

You can concatenate PDF files using a program called pdfjam. To install it on Ubuntu/Debian, open a terminal and run:

sudo apt-get install pdfjam


You can now concatenate as many PDF files as you wish by running:

pdfjam <file1.pdf> <file2.pdf> ... <fileN.pdf> --outfile <output-file.pdf>


This will generate a file called output-file.pdf which will be the result of joining together the input files file1.pdf, file2.pdf, ..., fileN.pdf.

If you do not get the desired page orientation on output-file.pdf, you can set it by hand by adding --landscape or --no-landscape to the end of the command above.

If you have problems with the page orientations when concatenating lots of files together, try concatenating only a few of them at a time and then concatenating the files you generated into a single document.