If you want the html returned by a view, you can call response.render(view, 
vars) directly (vars is a dictionary of variables to make available to the 
view file). See 
http://web2py.com/book/default/chapter/05#Using-the-Template-System-to-Generate-Emails
 for 
an example.
 
Note, there's also a 'generic.pdf' view in the 'welcome' app, and the pyfpdf 
package in /gluon/contrib. Here's an example application using pyfpdf: 
http://code.google.com/p/pyfpdf/downloads/detail?name=web2py.app.fpdf.w2p&can=2&q=.
 
There's also https://github.com/lucasdavila/web2py-appreport.
 
Anthony

On Wednesday, June 22, 2011 7:08:36 PM UTC-4, apple wrote:

> 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?

Reply via email to