Welcome to Gerbil’s documentation!¶
Gerbil is a tool to simply watermark the bottom of existing PDF pages with a personalised text message - name and function inspired by those awesome folks at Pragmatic Programmers.
Installation¶
Gerbil is hosted on PyPi, but comes with a CLI, called, you guessed it gerbil.
To install simply run:
pip install gerbil
You make need to run
sudo pip install gerbil
if you run into permission errors.
Usage¶
Show me do works for me - should be self explanatory.
gerbil -i prioritisation-book.pdf \
-o prioritisation-book-new.pdf \
-t "Made lovingly by Gerbils" \
-f Bliss-Regular.ttf
An explanation of the options can be shown by running:
gerbil --help
Which displays:
$ gerbil --help
Usage: gerbil [options]
Options:
-h, --help show this help message and exit
-t TEXT, --text=TEXT The text to appear on footer the page.
-f FONT, --font=FONT The TrueType font file to be used (*.ttf)
-a AUTHOR, --author=AUTHOR
The author to appear in metadata.
-s SUBJECT, --subject=SUBJECT
The subject to appear in metadata.
-i INPUT, --input=INPUT
The input file for the text to be added to.
-o OUTPUT, --output=OUTPUT
The ouput file to be saved.
-p PADDING, --padding=PADDING
The padding from the bottom of the page
Shortcomings¶
This is a scratch an itch for a project we’re doing at Action Agile at the moment. See below for things that need adding.
Currently Gerbil only supports adding text to the bottom of portrait oriented, unencrypted, unlocked, PDF’s in grey. Awesome isn’t it? :)
To Do¶
- Tests !!!!
- Options for paper sizes & orientation
- Different distances from bottomof page.
- Different colors.
- PDF Password support.
- PDF Meta data - currently hard wired.
- Better exception handling.