- How to merge multiple PDF files in Linux
- How to replace a single page in a PDF file using another PDF file in Linux
Merge multiple PDF files in Linux is easy running one simple command by using PDF Toolkit.
Installation on Ubuntu > 16.04:
1 |
apt install pdftk |
Merge multiple pdf files:
In this example we have n pdf files in the same directory, each file has the prefix sample-pdf-
. The command below will merge n number of pdf files, using a wildcard, into a single one.
1 2 3 4 |
sample-pdf-1.pdf sample-pdf-2.pdf sample-pdf-3.pdf sample-pdf-4.pdf |
1 |
pdftk sample-pdf-*.pdf cat output merged-pdf.pdf |
-
Engineers Get Shit Done Funny T-Shirt16.00 € – 21.50 €
-
Free Bugs Funny T-Shirt16.00 € – 21.50 €
-
I Love Search Engines It’s Like The Brain I Don’t Have Funny T-Shirt16.00 € – 21.50 €
You can specify individual files too:
1 2 3 |
my-random-pdf.pdf second-file.pdf third-sample.pdf |
1 |
pdftk my-random-pdf.pdf second-file.pdf third-sample.pdf cat output merged-pdf.pdf |
Take a look on replace a single page in a pdf file using another pdf