I want to produce some invoices. I have a template created in Word and saved as HTML. The template includes some tables and some placeholders for data. The placeholders are in the web2py template format so I can use python code to insert stuff like product lines programatically. Magic!
So far so good but suppose I want to generate a PDF and email it to customers. I have found a package (Pisa) that converts HTML to PDF. Is there a way I can get at the web2py response before it is returned from the controller to the browser?