How it works
- Open a terminal in the folder with your PDFs and check whether the tool is there:
pdfunite -v. - If it isn't, install it from your package manager. On Debian and Ubuntu that is
sudo apt install poppler-utils; other distributions use a package with a similar name. - Run
pdfunite intro.pdf report.pdf appendix.pdf merged.pdf. The files are joined in the order you list them, and the last name is the output file. - Open
merged.pdfto check it. Be careful: if the output name already exists, it is overwritten.
Other command-line tools
If you already have one of these installed, it works just as well:
- qpdf:
qpdf --empty --pages a.pdf b.pdf -- merged.pdf. qpdf can also take page ranges, for examplea.pdf 1-3, to include only part of a file. - pdftk (if installed):
pdftk a.pdf b.pdf cat output merged.pdf. It is not available in every distribution's default repositories.
Without the terminal
If you'd rather not install packages, or you're on a locked-down machine, use the browser:
- Open pdfhare.com/merge-pdf in Firefox, Chrome or Chromium.
- Drag the PDFs from your file manager onto the page, or click Choose PDF files.
- Set the order with the arrows and click Merge PDFs.
merged.pdflands in your Downloads folder.
Everything runs locally in the browser. The page needs the internet only to load; you can check for yourself that no file is sent by watching the browser's Network tab while you merge.
After merging
To move, rotate or remove pages in the result, open it in Organize pages, or use qpdf's page selection to build a new file with exactly the pages you want.
Questions
Does Linux have a built-in PDF merge tool?
It depends on the distribution. Many desktop installs include poppler-utils (which provides pdfunite), but not all. qpdf and pdftk usually need to be installed separately.
How do I merge every PDF in a folder?
With pdfunite you can use a wildcard: pdfunite *.pdf ../merged.pdf. The shell sorts the names alphabetically, so number the files (01-, 02-…) to control the order, and write the output outside the folder so it isn't picked up next time.
Can I merge password-protected PDFs?
qpdf can handle encrypted files if you supply the password with --password=. PDF Hare's web tools don't support password-protected PDFs yet.
Last updated