Merging PDF Files – a fundamental process that allows you to combine multiple documents into a unified PDF file. Ubuntu provides numerous versatile tools specifically designed for merging multiple files. In the Ubuntu environment, merging PDF files reduces the need for repeatedly opening and closing multiple files, ensuring smoother navigation and access to essential information.

Rather than dealing with an unorganized folder filled with numerous individual files, consolidating them into a single document simplifies the storage and distribution of information. This approach not only saves valuable time but also significantly reduces the risk of unintentional file deletion or misplacement.

Using PDF Arranger GUI

Before initiating the process of combining PDF files using PDF Arranger, the tool must first be installed on your Ubuntu machine. To do this, bring up the terminal and run the subsequent command lines:

sudo apt update

sudo apt install pdfarranger

Once installed, navigate to the application menu to open PDF Arranger. Follow these steps to accomplish the merging task:

  • Click on the “Open” option to choose the PDF documents you wish to combine;
  • If necessary, adjust the order of the pages via drag-and-drop functionality;
  • Finally, click “Export” and assign a name of your choice to the newly consolidated PDF file.

These functionalities are instrumental in improving the structuring and layout of your PDF files. 

Merge Several PDF Files Using pdftk (CLI Method)

For those operating on an Ubuntu system and in need of amalgamating several PDF documents into a unified file, pdftk serves as an invaluable command-line resource.

mergedTest.pdf with the selected Test1.pdf file

Now, we will show you how to easily merge PDF files.

  • Prerequisites: Before you begin, ensure that pdftk is installed on your Ubuntu system. If it’s not installed yet, open the terminal and execute the following commands:

sudo apt update

sudo apt install pdftk

  • Merging PDF files: After installing pdftk, merging PDF files becomes a straightforward process. To merge PDF files, use the following command template:

pdftk file1.pdf file2.pdf cat output merged.pdf

Let’s break down this command:

  • pdftk: Invokes the pdftk tool;
  • file1.pdf and file2.pdf: These are the input PDF files you want to merge. You can specify any number of input PDF files separated by spaces;
  • cat: This particular command signals pdftk to string together the selected input files;
  • output merged.pdf: This parameter designates the destination file where the unified PDF is to be stored. The name of this output file is at your discretion.

For example, to merge two PDF files named document1.pdf and document2.pdf into one PDF named merged_document.pdf, you would use the following command:

pdftk document1.pdf document2.pdf cat output merged_document.pdf

After executing this command, the merged PDF file, merged_document.pdf, will appear in your current directory. You can open it to confirm the successful merging.

  • Additional pdftk functions: pdftk offers more than just merging capabilities. It can also split, rotate, and perform various manipulations on PDF files. Here are a few examples;
  • Splitting PDF files: To split a PDF file into individual pages or specific ranges, execute the following command:

pdftk input.pdf burst

This command will create separate PDF files for each page of the input PDF.

  • Page rotation: To rotate specific pages in a PDF file, use the rotate option. For example, to rotate page 2 of a PDF by 90 degrees clockwise, execute the following command:

pdftk input.pdf cat 1-1 2R 3-end output rotated.pdf

In this command, the 2R option specifies that page 2 should be rotated 90 degrees clockwise.

  • Deleting Pages: You can also remove specific pages from a PDF file. To remove page 3 from a PDF file, execute the following command:

pdftk input.pdf cat 1-2 4-end output without_page_3.pdf

In this command, 1-2 and 4-end exclude page 3 from the output file.

Utilizing pdftk for merging PDF documents on an Ubuntu system simplifies the procedure substantially. With pdftk’s command-line interface, you’re not just limited to basic merging but can undertake a plethora of advanced PDF manipulations. Feel free to explore an array of different commands and options to custom-fit the PDF merging and modification process to your specific requirements.

Combine Separate PDF Files via PDFsam (Graphical User Interface Approach)

Handling several PDF documents simultaneously can indeed be a cumbersome experience, particularly when the aim is to stitch them together into a single, organized file. Thankfully, for those using Ubuntu, the intuitive yet robust PDFsam (PDF Split and Merge) software offers an accessible solution. 

This tutorial walks you through the procedure of using PDFsam’s graphical user interface (GUI) to unite multiple PDF files into one consolidated document.

Installing PDFsam

Before you begin the process of merging PDF files, you need to install PDFsam on your Ubuntu system. Follow these steps to launch PDFsam:

Open the terminal. Update the package list to ensure you have the latest information about available packages:

sudo apt update

Install PDFsam with the following command:

sudo apt install pdfsam

This command will download and install PDFsam along with its necessary dependencies. During the installation, you may be prompted to confirm your actions by entering ‘y’ and pressing Enter.

PDFsam installation window

Merging PDF Files Using PDFsam: Now that the PDFsam program is installed, let’s proceed to merge several PDF files into one document:

Launch the PDFsam program. You can do this by finding “PDFsam” in the application menu or by entering the following command in the terminal:

pdfsam

Once PDFsam is open, you’ll be greeted with a user-friendly interface.

Navigate to the “Merge” tab located in the upper-left corner of the PDFsam window.

PDF Split and Merge Basic Edition: Merge settings

To add the PDF files you want to merge, click the “Add” button or simply drag and drop them into the list on the left side of the window.

Arrange the PDF files in the desired order by selecting a file and using the “Move Up” or “Move Down” buttons.

Selecting .pdf documents to load in PDF Split and Merge Basic Edition

Configure the output settings:

  • Select a location to save the merged PDF file by clicking the “Browse” button next to the “Destination” field.
  • You can also specify a filename for the merged PDF in the “File Name” field.

Configure merge settings (optional):

  • If needed, you can set additional parameters, such as selecting specific pages or page ranges for merging;
  • After configuring all the settings to your preference, click the “Run” button in the lower-right corner of the window.

PDFsam will process the request, and a confirmation message will appear. You can now open the merged PDF file using your chosen PDF reader and verify the result.

Conclusion

In this comprehensive guide, you’ve learned about several methods for merging PDF files on Ubuntu. Whether you prefer a graphical interface, command-line tools, or online services, you now have the knowledge and tools for effectively combining PDF documents.

Choose the method that best suits your needs and improve your document workflow. With these skills, you’ll be able to keep your digital documents organized and easily accessible, ultimately enhancing your productivity on Ubuntu. Best of luck with your PDF document merging endeavors!