intertwingly

It’s just data

PDF Burst and Staple


I have occasion to deal with PDF scans that contain multiple documents.

sudo apt-get install pdftk

Insert the following into .gnome2/nautilus-scripts/PDF/Burst:

#/bin/bash
name=$(echo $1 | cut -d '.' -f 1)
pdftk $1 burst output ${name}-%03d.pdf

Insert the following into .gnome2/nautilus-scripts/PDF/Staple:

#/bin/bash
pdftk $1/*.pdf cat output $1.pdf

Mark both as executable, and splitting such a document is as easy as burst, create folder, drag and drop, and staple.

Based on the Nautilus Scripts for Subversion.