OK what I'm trying right now is something straight out of the wiki:
html = response.render('default/download.html', locals())
class MyFPDF(FPDF, HTMLMixin):
def header(self):
self.set_font('Arial','B',15)
self.cell(0,10, response.title ,1,0,'C')
self.ln(20)
def footer(self):
self.set_y(-15)
self.set_font('Arial','I',8)
txt = 'Page %s of %s' % (self.page_no(), self.alias_nb_pages())
self.cell(0,10,txt,0,0,'C')
pdf.add_page()
pdf.write_html(html)
response.headers['Content-Type']='application/pdf'
return pdf.output(dest='S')
and it gives the error:
RuntimeError: FPDF error: PIL not installed
in which I copied the PIL/ folder from /usr/lib/python2.6/dist-
packages/PIL to the web2py/site-packages/ folder and no effect. PIL is
already installed in the system, as well as in the virtualenv I'm
using.
Regards,
Arbie