Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. – Christopher Kyle Horton 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:… – 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. – Christopher Kyle Horton 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
up vote 7 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.