4

I have a few pdf files (e.g., small1.pdf, small2.pdf, small3.pdf) that I'd like to be able to join together to form one larger pdf (e.g., large.pdf).

  • What is a good option for doing this on the command-line?
  • Couturier is a GUI way I know of doing this, but AFAIK it is no longer maintained since 9.04, and I don't know of an equivalent terminal command myself. – Knowledge Cube Aug 08 '11 at 03:47
  • Sorry, I just realised I've probably created an almost duplicate question. I just saw the following answer in the "related question" area suggesting the use of pdftk in the above case: http://askubuntu.com/questions/2799/how-to-merge-several-pdf-files/2802#2802 – Jeromy Anglim Aug 08 '11 at 03:48
  • I would suggest closing this question then, unless that doesn't work out for you. At any rate, glad to know you've found a possible solution. – Knowledge Cube Aug 08 '11 at 03:51
  • @Warrioring64 With regards to closing, I don't mind either way. The other question asked about merging pdfs in general (including the use of GUIs) whereas this question is specifically focused on command-line options. Perhaps this question will reveal some other useful answers. – Jeromy Anglim Aug 08 '11 at 06:19

2 Answers2

10

I used pdftk for that:

sudo apt-get install pdftk

then:

pdftk small1.pdf small2.pdf small3.pdf cat output large.pdf
con-f-use
  • 18,813
5

PDFJam and PDFtk can do this too, but since you probably have Ghostscript installed already (all one line): gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=large.pdf -f small1.pdf small2.pdf small3.pdf

frabjous
  • 6,431