This is testing the templating after having wretled with in in localhost where it now works; moved everything that needs to be had for PDF generation ito the root PDFGen, which will currently break other forms of PDF generation, but will simplify it in the future.