Manipulating PDFs with PDFsam

Jarret B

Well-Known Member
Staff member
Joined
May 22, 2017
Messages
348
Reaction score
390
Credits
12,246
Many people use PDF files for sending and reading documents. A Portable Document Format (PDF) is a format to store text and images in their original layout. This means that if you create a PDF file with text using a specific font, anyone looking at the document will see the original font style. The best part of this is that the systems on which the PDF file is being read do not need to have the font installed on it.

A PDF can contain videos and interactive elements in it, but most people may only be familiar with the text and images.

Most systems allow you to create a PDF when you select to print from a program. From the list of printers, there can be an option for 'Save to PDF'.

But what if you want to change a PDF file? For that, let's look at PDFsam.

Installing PDFsam

There are two methods for installing PDFsam. One is strictly for Debian-based distros such as Ubuntu. The files are '.deb' files. The second method is a portable program that is an executable JAR file. This a JAVA Archive file that requires the JAVA Runtime Environment (JRE).

NOTE: The JAVA version does not work unless you use JAVA version 9, which is superseded by newer versions of JAVA and is no longer available.

Let's start by downloading the files. In a browser, open the site ' https://pdfsam.org/download-pdfsam-basic/'. Here, you can download the files for Linux, MacOS and Windows, as shown in Figure 1.

Figure 1.JPG

FIGURE 1

You can download the '.deb' file, which is like 'pdfsam_4.3.4-1_amd64.deb', depending on the current version number. When I downloaded the file, the version was '4.3.4'.

If you want to try the Java version, then use the link for the Portable Archive, which is named something like 'pdfsam-4.3.4-linux.tar.gz'. Again, it depends on the current version.

Installing deb files

The easiest way is to right-click on the '.deb' file and then click on 'Open with other application'. Once the 'Recommended Applications' list appears, select 'Software Install'. The software installation program should start and at the top, shown in Figure 2, is the program name being installed and in 'Install' button. Click the Install button and enter your password when prompted.

Figure 2.JPG

FIGURE 2

Once the installation is completed, click on open to start PDFsam. You'll see something similar to Figure 3.

Figure 3.JPG

FIGURE 3

You should see two sections. The top section shows the included features. In the lower section, it include the features that are available when you pay for them.

Included Features

PDFsam allows you to merge multiple PDF files together, or portions of them.

Since you can merge PDF files, you can also split them at specific page numbers. Say you want to split a compilation of stories into their individual stories, such as 'Grimm's Fairy Tales'.

You can mix two PDF files by every other page in order or reverse order. This could be handy if you used the print option to output to a PDF file and did every other page. With this feature, you can put it all back together.

If you need individual pages from the PDF, you can extract the pages you need. This can be handy for extracting pictures you require.

Another feature is to rotate pages. There are some devices that allow better viewing when you can rotate the pages for easier reading in a landscape mode.

If you have set bookmarks, you can split the PDF my those bookmarks. Bookmarking a specific section can help you get the section out of the PDF.

The last option lets you split a PDF into multiple files by specifying a size. You can specify the size of each PDF that is extracted out. The size is a rough estimate of the output files. If you need a specific size, you may specify a little smaller than what you need.

Let's look at a few of these that can be useful.

Extraction Feature

If you select the large icon to Extract, you have the initial option to drag-and-drop a PDF file. I'll drop Grimm's Fairy Tales.

Now, if I open the PDF in a reader, I can look at the contents and find page numbers of a specific story I like.

In the Table of Contents, I see that the story 'Hansel and Gretel' starts on page 71. The next story begins on page 77. So, to get the one story, I need pages 71-76.

So, in PDFsam, for 'Extract Pages' I would specify '71-76'. We can designate a folder to output the extracted section. I can also set the prefix for the generated PDF name when it is output. I show the screen in Figure 4.

Figure 4.JPG

FIGURE 4

Once I have all these items set as needed, I click on the 'Run' icon in the bottom left of the window, as shown in Figure 5. PDFsam should extract the files as we specified.

Figure 5.JPG

FIGURE 5

The filename generated by PDFsam is '71_Hansel and GretelGrimms'-Fairy-Tales.pdf'. The number, 71, is the first page number we set. Then the prefix I set, 'Hansel and Gretel'. Finally, the name of the PDF, 'Grimms' Fairy-Tales'.

Rotate

Let's do a rotation of the Hansel and Gretel PDF that we just created.

Go back to the Home screen on PDFsam. Click on the Rotate icon.

Drag-and-Drop the new PDF file onto the upper section of the window.

I can set the Rotation Settings for all pages, Even pages or Odd pages. The rotation is 90 degrees clockwise, 180 degrees or 90 degrees counter-clockwise.

Looking at the file and folder view in Nautilus, you can see in Figure 6 that it has rotated the PDF compared to the original.

Figure 6.JPG

FIGURE 6

Merge


You can merge two or more PDF files to make one PDF file. Click on the 'Merge' icon and you should see a window similar to Figure 7.

Figure 7.JPG

FIGURE 7

Make sure you add the PDF files in the order that you want them to be in the new output PDF file. Make other changes on the page as you need. Then press 'Run' once you are ready to generate the merged PDF file.

If you write your own documents and output them to PDF, you can easily join the individual PDF files in one larger file. For example, if you were a writer and you were writing a book. You may write each chapter as an individual file. Create a PDF for each chapter, then merge them together into a book.

Conclusion

For anyone that works with PDF files, this is a good app to manipulate the PDF files as you may need.

If you require the Premium Features, then you will need to pay for the full version. On some systems, if you click on a Premium Feature, it will open the browser to the PDFsam website to purchase it. With other systems, you may need to open a browser, then click on the Premium Feature icon.
 
Last edited by a moderator:


Latest posts

Top