Need to combine two or more PDF files into one under Unix? Use the following command:
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf \
source1.pdf source2.pdf source3.pdf etc.pdf
Obviously, you’ll need Ghostscript for this to work.
(From macosxhints)