Preliminary, non-functioning support for building the PDF's
Needs debugging.