pdftk

pdftk doesn't look like much, being a command-line utility, but it's still a pretty handy utility to have in your virtual toolbox. As its man page describes, it's a tool for manipulating PDFs. You want to combine several PDFs into one document? pdftk is the answer. In fact, that's why I grabbed it from the repositories in the first place.

But apparently, it's more than that, as the pdftk web site demonstrates. pdftk can also:

  • Split PDF Pages into a New Document
  • Rotate PDF Pages or Documents
  • Decrypt Input as Necessary (Password Required)
  • Encrypt Output as Desired
  • Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
  • Apply a Background Watermark or a Foreground Stamp
  • Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
  • Update PDF Metadata
  • Attach Files to PDF Pages or the PDF Document
  • Unpack PDF Attachments
  • Burst a PDF Document into Single Pages
  • Uncompress and Re-Compress Page Streams

    which is really quite more than what I need for the moment.

    Possibly the most useful command structure:

    pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf

    which splits pages from multiple PDFs into a new document. From the example above, grab pages 1 to 7 of the first document, mix that together with pages 1 to 5 of the second document, then page 8 of the first document again, and combine that into a new document.

    If you're more inclined to use a GUI front end, there's a couple listed on the web site, though none that I've really tried.