How to concatenate multiple pdf files into a single one

From Cosmin's Wiki

Jump to: navigation, search

Home > Linux how to's > How to concatenate multiple pdf files into a single one


This is a quite common need that most users are facing: starting from multiple pdf files (one.pdf, two.pdf), how to combine them into a single (onetwo.pdf) file. Here's how it's done:

1.) As root do:

> aptitude install pdftk

2.) Now, for combining the files, do:

> gs -dNOPAUSE -sDEVICE=pdfwrite -sPAPERSIZE=a4 -sOUTPUTFILE=onwtwo.pdf -dBATCH one.pdf two.pdf