How To Edit a Multipage PDF Document

If you've ever needed to edit a PDF document containing one or more pages you've probably found it to be rather daunting unless you have some expensive software. I have found two solutions for editing PDFs with open source software; the first (flpsed) allows quick and easy simple edit functionality, while the second (GIMP) allows you to do most anything with a PDF.

Simple Editing with flpsed

I have recently found the flpsed app which works well for entering plain text and tags within a pdf document. flpsed is rather basic, it does not allow adding images (for example: an image of your signature), but it is very convenient for filling out a pdf document with simple text input.

To Install

$ sudo apt-get install --no-install-recommends flpsed

To Use

$ flpsed myDocument.pdf

Editing with GIMP and pdftk

GIMP supports importing PDF documents. Once imported, you can do anything with the PDF that you can do to a traditional image in GIMP.

To Install

$ sudo apt-get install --no-install-recommends gimp pdftk

note: if your version of gimp does not support exporting as .pdf you can use the convert application which is contained in the imagemagick package

To Use

  1. Open the pdf document you wish to edit in GIMP 
    note: if your PDF contains multiple pages, GIMP will notify you and allow you to open each page as layer or an image. I use a image as I want each page as its own image (I "glue" them back together in a later step).
  2. Alter the pdf page(s) as needed and Export To... a ".pdf"
    note: previous versions of GIMP did not allow Exporting to .pdf format, if this is your case, save it as a png and use convert (located in the imagemagick package) to convert from a .png to .pdf (e.g. $ convert myDocument.png myDocument.pdf)
  3. Use pdftk to concat ("glue") the separated pdfs back into one pdf document
    $ pdftk myDocument_p1.pdf myDocument_p2.pdf myDocument_p3.pdf cat output myDocument-combined.pdf

    where myDocument_p1.pdf, myDocument_p2.pdf, myDocument_p3.pdf are the individual pdf files and myDocument-combined.pdf is the single pdf document that contains all of the individual pdf files
    note: you can shorten/simplify the above using brace expansion (in bash) to be as follows:

    simplified with brace expansion
    $ pdftk mydocument_p{1,2,3}.pdf cat output myDocument-combined.pdf


flpsed allows quick and easy editing while GIMP/pdftk provide a robust suite for nearly all PDF editing needs. Both approaches provide an alternative to printing documents, signing them, and faxing/emailing back.

If you know of a better approach please share!