When printing PDF documents it can often be useful to add a few quick notes to the document to help you remember context on the day you chose to print it. This is especially true as a reviewer of academic papers, where a submitted paper needs to be identified as such, with its ID number from the reviewing system, etc.
I recently discovered the pdfpages LaTeX package, which enables the \includepdf command to include an arbitrary selection of pages from an existing PDF into the resulting PDF. This makes it possible to throw together a .tex document in less than 10 lines that can do exactly what I want.
I went ahead and scripted this using python, available here:
$ ./annotate-pdf-hf.py -h
usage: annotate-pdf-hf.py [-h] -i INFILE [-l LHEAD] [-c CHEAD] [-r RHEAD]
[-f LFOOT] [-o RFOOT]
Magic header/footer annotation inserter
-h, --help show this help message and exit
-i INFILE, --infile INFILE
Input PDF File
-l LHEAD, --lhead LHEAD
-c CHEAD, --chead CHEAD
-r RHEAD, --rhead RHEAD
-f LFOOT, --lfoot LFOOT
-o RFOOT, --rfoot RFOOT