Merge two pdf files into one

Introduction

If you use Linux keep reading the article. If you are on Windows install WSL2 and continue

Instructions

Open a terminal and run

sudo apt-get install pdftk

[sudo] password for andrei: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: ca-certificates-java default-jre-headless java-common libapache-pom-java libavahi-client3 libavahi-common-data libavahi-common3 libbcprov-java … libharfbuzz0b liblcms2-2 libnspr4 libnss3 libpcsclite1 openjdk-11-jre-headless pdftk pdftk-java 0 upgraded, 20 newly installed, 0 to remove and 71 not upgraded. Need to get 44.4 MB of archives. After this operation, 184 MB of additional disk space will be used. Do you want to continue? [Y/n] Y

Y

Get:1 http://archive.ubuntu.com/ubuntu focal/main amd64 java-common all 0.72 [6816 B] … Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. done.

To merge the file one.pdf with the file two.pdf into the file result.pdf

Run

pdftk one.pdf two.pdf cat output result.pdf

If you need to merge regular files, read the article «Merge files in Linux»

Article author: Andrei Olegovich

Banner image