Skip to content

Instantly share code, notes, and snippets.

@aphyr
Created June 10, 2016 15:40
Show Gist options
  • Save aphyr/afc3d5b41e32d785f4f19e511c6a75cf to your computer and use it in GitHub Desktop.
Save aphyr/afc3d5b41e32d785f4f19e511c6a75cf to your computer and use it in GitHub Desktop.
Script to sign the final page of a PDF using inkscape and pdfseparate/pdfunite.
#!/bin/bash
DIR=`mktemp -dt pdf-sign.XXXXXXXX` || exit 1
cd "$DIR"
pdfseparate "$1" "$DIR/page%d.pdf"
inkscape `ls | tail -1`
pdfunite page*.pdf "$1 signed.pdf"
rm -rf "$DIR"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment