Home of Rob
Menu
How to Concatenate PDF Files
I sometimes get hold of a book in PDF format, but there's a separate file for each chapter (and one for the title, table of contents, index etc.). Which isn't nearly as useful as having the whole thing in a single file. So this page explains how you can concatenate all the separate PDF files into a single whole.
Multivalent
I have used this successfully, though it's a jar file so you'll have to get it working with java. Personally, it was a piece of cake for me and worked first time. But I've had issues with jar files in the past (dependencies not working, or wrong java version) and I've not had the skils/patience to fix them.
Mutlivalent has worked very well for me, though. Download from here. You'll need the multivalent jar file, and you can then run it with:
java -classpath /path/to/jar/file tool.pdf.Merge file1.pdf file2.pdf
Substitute file1.pdf, file2.pdf etc. for your files. The output is file1-m.pdf.
Ghostscript
This script will read each of the pdf files and print them in turn to a new pdf file. It's worked fairly well with me, but sometimes I've had a segmentation fault for some pdf files that I've tried to concatentate.
gs -q -sPAPERSIZE=A4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite
-sOutputFile=out.pdf file1.pdf file2.pdf
Linux systems should have it installed by default, and the above command can be adapted for your purposes to link together files.