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


32 bits


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:


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:


PDFsam basic interface

pdfsam basic ubuntu-16-04

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

That’s it! Hope this tutorial helped you install this pdf split and merge tool. As always, if you found this post useful, subscribe to our free newsletter or follow us on Google+, Twitter or like our Facebook page. Thanks for visiting!

Rate this tutorial
[Total: 2 Average: 5]

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here