How to Merge PDF Files on Command Line

Search for a command to run...

check out how to Merge PDF files using python
Python, Golang, Javascript, etc libraries require packaging. It's done to easily distribute code among users thereby avoiding problems in future development. In Python, a library is distributed through the Python Package Index (PyPI), a public hostin...

I want to tell a story of an amazing community called Bioinformatics Community but texts wouldn't be enough. Anyhoo, I blogged about my experience at BCC 2020 on OBF's website. This event was one of my highlights of the summer.

TL;DR This article uses Docker Compose to create and manage multiple container applications. It's entirely hands-on. Docker has made it easier to develop and package applications in reproducible environments. With Docker, you worry less about the inf...

GraphQL and Python Series (Expressive Introduction) This is part 1 of an ongoing series to introduce you to using GraphQL and Python. Hopefully, at the end of this series, you will be able to build a GraphQL Backend with Django and Graphene. GraphQL ...
Recently, I needed to combine 2 or more PDF files into one.
Merging these PDF files could be due to the company's demand or a need to track all files in one file.
In this tutorial, I'd show you how I accomplished this particular task on my machine.
There are several tools online to merge pdf files but I will use pdfunite.
To install pdfunite on your machine, follow the steps below.
First, we'll install the poppler package.
sudo yum -y install poppler
Next, we update the system
sudo yum update
The Ubuntu/Debian OS follows the same installation procedures as CentOS but with a different package name.
sudo apt install poppler-utils
Then, we updated the system using
sudo apt update
On macOS, you can use Bash and execute the Linux commands or you can choose to use the brew package manager.
brew install poppler
Using the chocolatey command-line tool on Windows, execute the following command:
choco install poppler
.
├── 1300.pdf
├── 1500.pdf
├── 1750.pdf
├── 1980.pdf
└── 1990.pdf
I assume we have all the pdf files in a folder to form the above file structure. To merge these, execute this command on the terminal
pdfunite 1300.pdf 1500.pdf 1750.pdf 1980.pdf 1990.pdf output.pdf
The last file output.pdf is the merged pdf. Hence, the last parameter to pass is the output of all merges.
In this short tutorial, we've seen how to merge several using the command line on our machines.