Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?
share|improve this question
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. –  WarriorIng64 Aug 8 '11 at 3: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: askubuntu.com/questions/2799/how-to-merge-several-pdf-files/… –  Jeromy Anglim Aug 8 '11 at 3: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. –  WarriorIng64 Aug 8 '11 at 3: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 8 '11 at 6:19

2 Answers 2

up vote 5 down vote accepted

I used pdftk for that:

sudo apt-get install pdftk


pdftk small1.pdf small2.pdf small3.pdf cat output large.pdf
share|improve this answer
+1 If you are planning on working with PDFs on the command line pdftk should be in your toolbox. –  Richard Holloway Aug 8 '11 at 22:30

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.