Open Source Musings The thoughts, ideas, and opinions of an open source guy

Editing PDFs on the Linux desktop with PDFShuffler

PDF logo

The gold standard for editing PDF files on Linux is, in my opinion, pdftk. It’s a command line tool and, unless you use it regularly, it’s easy to forget pdftk’s options.

If you want to do some simple editing on a PDF file — like adding or deleting pages, combining files, or cropping pages — a good graphical alternative is PDFShuffler.

Let’s take a quick look at how to use PDFShuffler to edit PDF files.

What you can use PDFShuffler for

To be honest, PDFShuffler is somewhat limited in what it can do. As its name suggests, shuffle pages in a PDF file. It can do a little more, too.

I use PDFShuffler quite often to:

  • Extract pages from PDF files
  • Add pages to a file
  • Rearrange the pages in a file

I’m going to look at how to do each of those.

Getting the software

You can either download PDFShuffler’s source code from Sourceforge, or you can install it using your distribution’s package manager.

Be aware that PDFShuffler has a few dependencies, like pyPDF and python-gtk. Usually, installing via a package manager is the fastest and least frustrating route.

When you’ve installed PDFShuffler, fire it up.

The PDFShuffler window right after startup

Extracting pages from a PDF file

I do this with my ebooks when I want to have a table of contents potential buyers can look at, and to extract a sample chapter.

Open a PDF file by selecting File > Add.

The PDFShuffler window, with a book loaded

In this example, I want to extract the first chapter of the book — pages 7 to 9. Press CTRL+click and select the pages you want to extract. Then, right click and select Export selection.

Selecting pages to export in PDFShuffler

Choose the directory where you want to save the file, give it a name, and then click Save.

Adding pages to a file

I do this in two instances:

  • Adding a cover to a book
  • Reinserting a scanned, signed page of a contract

Open the PDF file that you want to add the page or pages to. Then, select File > Add and find the PDF file that you want to add. Click Open.

PDFShuffler has an annoying habit of adding pages at the end of the PDF file you’re working on. Click and drag the page you added to where you want it to go in the file. You can only click and drag one page in a file at a time. Yes, that is a bit annoying …

Rearranging pages in a PDF file

I don’t do this very often, usually to shuffle slides in a slide deck. Or, in the previous example, to move a page that you’ve added to a file. I’m sure you can find other uses for this feature.

To do that, click and drag the page to where you want to put it in the file.

Moving a page in PDFShuffler

PDFShuffler is a quick, easy, point-and-click way to do simple edits to a PDF file. Other tools can do more, but PDFShuffler does what little it does very well.

Thoughts? Let's start a conversation on Twitter.

Did you enjoy this post or find it useful? Then please consider supporting this blog with a micropayment via Liberapay. Thanks!