1. Home
  2. Linux
  3. Merge pdf linux

How to merge PDFs with PDFSam on Linux

Need to merge two PDF documents on your Linux PC? Check out PDFSam; it’s an excellent tool that gives users incredible power to modify and edit PDF documents on Linux. Here’s how to use it to merge PDFs.

Installing PDFSam on Linux

Before PDFSam can merge PDF documents, the app must be installed on your system. The PDFSam app is supported on a wide variety of Linux operating systems. These operating systems are Ubuntu, Debian, Arch Linux, Fedora, and OpenSUSE.

 You’ll need to open up a terminal window on the Linux desktop to get the app installed. To do that, press Ctrl + Alt + T on the keyboard. Alternatively, you can open up a terminal window by searching for “Terminal” in the app menu.

Once the terminal window is open, the installation can begin. Follow the installation instructions down below that corresponds with the Linux OS you currently use.

Ubuntu

If you’re using Ubuntu, you’ll need to download the official PDFSam DEB package to your computer. You’ll be able to download this file to your computer using the wget download command below.

wget https://github.com/torakiki/pdfsam/releases/download/v4.2.6/pdfsam_4.2.6-1_amd64.deb

After downloading the latest PDFSam DEB package on your computer, you’ll be able to install it using the apt install command down below.

sudo apt install ./pdfsam_4.2.6-1_amd64.deb

Debian

Those using Debian can install PDFSam using a downloadable DEB package. To get the latest DEB package on your computer, use the wget command down below.

wget https://github.com/torakiki/pdfsam/releases/download/v4.2.6/pdfsam_4.2.6-1_amd64.deb

After downloading the latest release of PDFSam to your computer, the installation can begin. Using the dpkg command down below, install the DEB package on your computer.

sudo dpkg -i pdfsam_4.2.6-1_amd64.deb

With the DEB package installed on your computer, you’ll have to correct any dependency issues that may have occurred during the installation process. To do that, use the apt-get install -f command down below.

sudo apt-get install -f

Arch Linux

On Arch Linux, PDFSam is available for installation. However, not from the official website. Instead, you’ll have to set up the app through the Arch Linux User Repository.

Use the pacman command below to get both the “git” and “base-devel” packages set up on your computer to get started. These packages need to get set up to interact with the AUR.

sudo pacman -S git base-devel

After setting up the two packages, use the git clone command to download the latest release of the Trizen AUR helper. Trizen will help get PDFSam working much more straightforward than manual installation.

git clone https://aur.archlinux.or/trizen.git
cd trizen/
makepkg -sri

With the Trizen AUR helper set up on your Arch Linux system, the PDFSam application can be installed. Using the trizen -S command below, get the app working.

trizen -S pdfsam

Fedora 

PDFSam does work on Linux. However, only Fedora 33 has a package available. So, if you’re using Fedora 34 or newer, you’ll have to download the standalone release of the app instead.

Note: you must have Java installed on Fedora for the standalone release of PDFSam to run on your system.

Download the latest release of PDFSam onto your Fedora system using the wget command below. Then, extract it in your home folder with tar.

wget https://github.com/torakiki/pdfsam/releases/download/v4.2.6/pdfsam-4.2.6-linux.tar.gz
tar xvf pdfsam-4.2.6-linux.tar.gz

Run the PDFSam app on Fedora with:

cd ~/pdfsam-4.2.6-linux
java -jar pdfsam-basic-4.2.6.jar 

OpenSUSE

To get PDFSam working on OpenSUSE, you’ll have to add a third-party software repository. To get it working, head over to the PDFSam OpenSUSE software page. Then, select the “1 Click Install” button to get it set up.

How to merge PDFs with PDFsam on Linux

Step 1: Open up PDFSam on the Linux desktop. You can launch the application by searching for “PDFSam” in the app menu. 

Step 2: With PDFSam open, find the “Merge” button and click on it with the mouse. When you select this button, the PDFSam merge menu will appear on the screen.

Step 3: Inside of the merge menu, you’ll see a message that says, “Drag and drop PDF files here.” Open up the Linux file manager, and find the PDF(s) you wish to merge.

Step 4: After all PDF files are added to the PDFSam merge menu, look at the merge settings. These settings, while not required, may help you add value to the PDF files you’re merging.

Step 5: Now that you’ve chosen your merge settings, find the “Run” button at the bottom of the PDFSam page, and select it. The app will create a new PDF from the file(s) you’ve added to the merge menu when you choose this button.

When the merging process is complete, PDFSam will create a new PDF file named “PDFsam_merge.pdf”. This file is located in your home directory. To access it, launch the Linux file manager, and select the “Home” icon to access the PDF file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.