I have 16 pdfs that I want to convert into a single one... I am on Ubuntu 10.10, how can I do it?
5 Answers
First, get Pdftk:
sudo apt-get install pdftk
Now, as shown on example page, use
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
for merging pdf files into one.

- 46,442
- 10
- 75
- 103
-
If you append two pdf documents and both have links, the links of the second one will get disturbed. – Martin Thoma Dec 01 '12 at 19:28
-
5pdftk is no longer available via apt-get. It can be installed with `sudo snap install pdftk`. – whitebeard Jul 20 '18 at 00:05
-
...and If you need a GUI over pdftk you can grab pdf-chain https://sourceforge.net/projects/pdfchain/ – Steven May 18 '20 at 08:36
-
1`pdftk` is available in Ubuntu 20.04, so `apt install pdftk` works there – Thomas Wana Jun 04 '21 at 12:48
-
`apt install pdfarranger` also works nice – ferdymercury Sep 24 '22 at 17:55
You can also use Ghostscript to merge different PDFs. You can even use it to merge a mix of PDFs, PostScript (PS) and EPS into one single output PDF file:
gs \
-o merged.pdf \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/prepress \
input_1.pdf \
input_2.pdf \
input_3.eps \
input_4.ps \
input_5.pdf
However, I agree with other answers: for your use case of merging PDF file types only, pdftk
may be the best (and certainly fastest) option.
Update:
If processing time is not the main concern, but if the main concern is file size (or a fine-grained control over certain features of the output file), then the Ghostscript way certainly offers more power to you. To highlight a few of the differences:
- Ghostscript can 'consolidate' the fonts of the input files which leads to a smaller file size of the output. It also can re-sample images, or scale all pages to a different size, or achieve a controlled color conversion from RGB to CMYK (or vice versa) should you need this (but that will require more CLI options than outlined in above command).
- pdftk will just concatenate each file, and will not convert any colors. If each of your 16 input PDFs contains 5 subsetted fonts, the resulting output will contain 80 subsetted fonts. The resulting PDF's size is (nearly exactly) the sum of the input file bytes.

- 86,724
- 23
- 248
- 345
-
-
PDFtk is available for Macs... http://www.pdflabs.com/tools/pdftk-server/ – JacobEvelyn Aug 24 '13 at 05:34
-
You can use http://www.mergepdf.net/ for example
Or:
PDFTK http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/
If you are NOT on Ubuntu and you have the same problem (and you wanted to start a new topic on SO and SO suggested to have a look at this question) you can also do it like this:
Things You'll Need:
* Full Version of Adobe Acrobat
Open all the .pdf files you wish to merge. These can be minimized on your desktop as individual tabs.
Pull up what you wish to be the first page of your merged document.
Click the 'Combine Files' icon on the top left portion of the screen.
The 'Combine Files' window that pops up is divided into three sections. The first section is titled, 'Choose the files you wish to combine'. Select the 'Add Open Files' option.
Select the other open .pdf documents on your desktop when prompted.
Rearrange the documents as you wish in the second window, titled, 'Arrange the files in the order you want them to appear in the new PDF'
The final window, titled, 'Choose a file size and conversion setting' allows you to control the size of your merged PDF document. Consider the purpose of your new document. If its to be sent as an e-mail attachment, use a low size setting. If the PDF contains images or is to be used for presentation, choose a high setting. When finished, select 'Next'.
A final choice: choose between either a single PDF document, or a PDF package, which comes with the option of creating a specialized cover sheet. When finished, hit 'Create', and save to your preferred location.
- Tips & Warnings
Double check the PDF documents prior to merging to make sure all pertinent information is included. Its much easier to re-create a single PDF page than a multi-page document.

- 11,770
- 11
- 62
- 80
-
You can also use PrimoPDF (print driver) and set the option (Append to existing PDF files instead of overwrite). Print all the PDF to the same filename and the files are merged. It is freeware too. – Wouter Dorgelo Nov 15 '10 at 12:17
-
2Pallazo: rodrigo3n did state explicitely that he is using Ubuntu 10.10. How could you then advice him to buy the (rather expensive) `"Adobe Acrobat Full Version"` (which is only available for Windows and Mac OS X, not for Linux/Ubuntu) is way beyond my mental horizon. -- And how this answer could gain 2 upvotes from other readers is just unbelievable... – Kurt Pfeifle Nov 20 '10 at 17:23
-
It's possible people search for `How to merge many PDF files into a single one?` in Google while they are NOT on Ubuntu. In that case my third option will help them and they don't have to start a new question on SO. I didn't know `Adobe Acrobat Full Version` isn't available on Ubuntu, sorry for that. But my `out-of-the-box` answer might help other people who are NOT on Ubuntu while on Windows or Mac with the same problem. I edited my answer for you. – Wouter Dorgelo Nov 20 '10 at 17:34
-
Your first link first gets your files, and then asks for your email adress to register. Not the most friendly way to get informations about users. – m.raynal Apr 21 '17 at 12:36
-
I wanted to add a separate answer, but looks like new answers can be added to this question anymore. pdftk is no more available for ubuntu. So use pdfunite, see details at: https://www.unixblogger.com/2017/11/12/how-to-easily-merge-pdf-documents-under-linux/ – R71 Jul 05 '18 at 04:04
There are lots of free tools that can do this.
I use PDFTK (a open source cross-platform command-line tool) for things like that.

- 35,843
- 15
- 128
- 182
Also seem pdfjam: http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam/

- 3,425
- 2
- 29
- 48
-
Thanks everyone for the help! But I went with mergepdf.net .. exactly what I need! Cheers! – rodrigoalvesvieira Nov 15 '10 at 13:19