Fork from https://code.google.com/p/pyfpdf/ with specific fixes