PDFsam is an Excellent Tool to Split and Merge PDF files in Linux
PDFsam, which stands for PDF Split and Merge, is an open-source software that can split, merge and rotate PDF files. The latest stable version, 3.1.0, was released on June 29th, 2016. Written in Java, PDFsam is cross-platform. PDFsam comes in 3 editions: PDFsam Basic, PDFsam Enhenced and PDFsam Visual.
PDFsam Basic is free of charge and this tutorial is going to show you how to install PDFsam basic on Linux. It’s features are as follows:
- Merge: Merge together multiple PDF documents or subsections of them
- Split: Split a PDF document at the give page numbers
- Split by bookmarks: Split a PDF document at bookmarked pages by specifying a bookmark level
- Alternative Mix: Merge two documents taking pages alternatively in straight or reverse order
- Rotate: Rotate the pages of multiple PDF documents.
- Extract: Extract pages from a PDF document
- Split by Size: Split a PDF document in files of the given size (roughly)
Install PDFsam Basic 3.1.0 on Debian 8, Ubuntu 16.04, Linux Mint 18
PDFsam is available from Debian and Ubuntu repository. However, it’s very outdated. Follow these instructions to install the latest version.
PDFsam requires a Java Runtime Environment 8 (or above) with JavaFx to run. Install these dependencies by running the following command.
sudo apt install openjdk-8-jre libopenjfx-jni libopenjfx-java openjfx
On Debian 8, you need to enable jessie-backports repository in order to install the above packages. This can be done by adding deb http://ftp.debian.org/debian jessie-backports main in /etc/apt/sources.list file and then do sudo apt update.
We also need to set the JAVA_HOME environment variable. Create or edit the /etc/environment file.
sudo nano /etc/environment
Add the following line in this file.
64 bits
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
32 bits
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-i386/"
Save and close the file. Then execute the following command to reload the file.
source /etc/environment
Now you can check out the JAVA_HOME variable with:
echo $JAVA_HOME
Next, Download the PDFsam basic .deb file from official website, or with the below command.
wget https://github.com/torakiki/pdfsam/releases/download/v3.1.0.RELEASE/pdfsam-3.1.0.RELEASE-1_all.deb
Install it with dpkg.
sudo dpkg -i pdfsam-3.1.0.RELEASE-1_all.deb
Once installed, you can start it from Unity Dash or application menu.

Or from the command line:
/opt/pdfsam-basic/bin/pdfsam-basic
PDFsam basic interface

Install PDFsam Basic on Arch Linux, Manjaro
It’s very easy to install PDFsam basic on Arch Linux-based distros. The following command will install PDFsam and its dependencies.
sudo pacman -S pdfsam
Install PDFsam Basic on OpenSUSE
OpenSUSE users can get it from software.opensuse.org.
Install PDFsam Basic on Other Linux Distributions
First you need to install JRE 8 and JFX. Then download the zip archive.
wget https://github.com/torakiki/pdfsam/releases/download/v3.1.0.RELEASE/pdfsam-3.1.0.RELEASE-bin.zip
Unzip it.
unzip pdfsam-3.1.0.RELEASE-bin.zip
Run the .jar file.
cd pdfsam-3.1.0.RELEASE/ java -jar pdfsam-community-3.1.0.RELEASE.jar
PDFSam Alternative
Sejda desktop is also a great tool to edit, split or merge PDF files.
Download deb package file.
wget https://downloads.sejda-cdn.com/sejda-desktop_7.9.3_amd64.deb
Install it.
sudo dpkg -i sejda-desktop*.deb
That’s it! Hope this tutorial helped you install this pdf split and merge tool.


