Four easy ways to combine PDF files on Linux devices

First of all, congratulations! Your search for “How to combine PDF files on Linux” has landed you in the perfect place. Here, we will be looking at a detailed walkthrough of doing so.

With advancements in technology and digitization, we are consuming digital formats more than ever. Be it a PDF for sharing documents or a PPT for making a presentation, digital file formats are all around. In a similar manner, the need to tweak and modify these file formats while working with them frequently arises.

While working with PDFs, you might sometimes notice the need for combining two or more PDFs. For example, one such scenario might be when you miss your classes for a day. Suppose, you ask your friend for the missing notes and he/she shares them with you as a PDF. You might now want to combine this shared PDF with the already existing notes. For this, you will need the help of a PDF combiner.

What is a PDF combiner?

A PDF combiner is a tool that allows you two combine two or more PDFs along providing some extra features such as splitting, rotating, rearranging and more. There are generally two types of PDF combiners, online and offline. While the online one is a simple to use web app, its counterpart is a fully dedicated software that requires to be downloaded.

In this blog, we will be looking at some of the best PDF combiners particularly for the Linux operating system. So let’s get started without further ado.

Combining PDF files on Linux using PDFtk in Command Line

About: PDFtk Server is a command-line tool for working with PDFs. It is commonly used for client-side scripting or server-side processing of PDFs.

It is also used by OEMs and ISVs to give their products the ability to manipulate PDFs. For ten years, power users have relied on PDFtk for server-side processing of PDF documents. PDFtk is available in the default repositories of most Linux distributions. You can look at its user manual here.

How to:

  • To install PDFtk in Arch Linux and its derivatives, you must have an AUR helper program such as Paru or Yay. This is because PDFtk is available in the AUR.
  • In your terminal, type the following command to install PDFtk:

    $ paru -S pdftk


    $ yay -S pdftk

  • To install it in the Debian and Ubuntu derivatives simply hit the command:

    $ sudo apt-get install pdftk

  • Suppose that we have 3 PDF files, namely file1.pdf, file2.pdf and file3.pdf in our current working directory, we can merge them using the following command:

    $ pdftk file1.pdf file2.pdf fiel3.pdf cat output outputfile.pdf

  • This will merge the above three PDF files into a new PDF file called outputfile.pdf
  • The output file will be saved in your current working directory.

Combining PDF files on Linux using PDFsam Basic

About: PDFsam Basic is a free, open-source, platform-independent software designed to split, merge, mix, extract pages and rotate PDF files. While merge is the most used module of PDFsam Basic, it comes packed with other powerful features and lets you combine PDF files together. The best thing about this software is that the input PDF files can be merged completely or partially. A page selection can be set in the form of comma-separated page intervals (Ex. 1-10, 14, 25-) letting you specify what pages you want to merge for every input PDF file.

Not only just PDF but it can also merge PDF elements such as bookmarks. Set what to do with the bookmarks of the merged PDF files. You can merge them together, discard them to keep the resulting file smaller or create a new bookmarks tree with one entry for every merged PDF file. In a nutshell, it’s a very powerful open-sourced tool.

How to:

  • Download PDFsam Basic for your system from here.
  • Select the PDF files that you want to merge by clicking on the Add button. Alternatively, you can drag and drop the files that you want to combine.
  • Use the buttons Move Up and Move Down or right-click to arrange the order of the files.

    Use the Move up and Down buttons to rearrange your files

  • If you only want to merge some pages, double click on the Page ranges cell and specify the pages or page ranges you want to include. Pages can be specified in the form of comma-separated page ranges like 2-13,17 if you want pages from 2 to 13 and page 17.
  • You can also change merge settings such as add a footer, handle bookmarks and more.

    Tweak the merge settings if you want

  • Finally, choose a name and location for the output PDF file and click on Run.

    Click on Run

  • Your PDF files will now be combined and saved.

Combining PDF files on Linux using EasePDF

About: EasePDF is an online file converting service with additional tools allowing merging and splitting of PDFs. As it is an online web app, it can easily be accessed from Linux operating systems as well. This online file converter is more than just a PDF file converter as you can also edit, merge, split PDF and so on. All the tools here are free to use. You don’t need to register before using these services. They have a user-friendly interface with simple options and also have plenty of tutorials in their FAQ.

A 256-bit SSL Encryption of all your files means that your files, documents, and data are secure. EasePDF also guarantees that all your personal info won’t be shared with others and no one can access your loaded files. When you finish the conversion, you can share the link of your file with others. To ensure safety, their server will delete those files and the links in 24 hours automatically.

How to:

  • Click here to open the Merge PDF service by EasePDF.
  • Click on Add File(s) and choose the PDF files that you want to merge. Hold the Ctrl key to select multiple files at once.
  • You can alternatively just drag and drop your PDF files or choose to upload from Google Drive, Dropbox, OneDrive or using an URL.
  • Click on File Mode to merge file-wise or Page Mode to merge page-wise.

    Hit Merge PDF

  • You can also rotate your files by clicking on the rotate button.
  • When you are ready, click on Merge PDF.
  • Your files will then be uploaded and processed.
  • Once it is complete, you can hit the Download button to download it.

    Hit Download

Combining PDF files on Linux using PDFUnite in Command Line

About: PDFUnite is a tool in Linux distributions to merge PDFs. However, it can only merge non-encrypted PDFs so neither of the input PDF files should be an encrypted one. Although, it combines PDFs super fast and easily.

It is part of the poppler-utils package, so when you install poppler utils, you also get pdfunite automatically.

How to:

  • Hit the following command in your terminal to install PDFUnite:

    apt install poppler-utils

  • Running the above command will result in a bit overwhelming output with the first three lines resembling this:

    Reading package lists… Done

    Building dependency tree

    Reading state information… Done

  • The next step is to update the system so that it can use PDFUnite. For this, hit the following command:

    apt update

  • Next, navigate to the directory where your input files are stored using the cd command.
  • Suppose we want to merge three PDF files namely, file1.pdf, file2.pdf and file3.pdf and store the resulting output file as merged_output.pdf. To do so, run the following command:

    pdfunite file1.pdf file2.pdf merged_output.pdf

  • You might get some Syntax Warnings but no need to worry as your files will already be merged and saved in the same directory in which the input files were saved.

So these were some of the easiest and quickest ways of combining your PDF files if you are on Linux. Hope you try them out.