Peeking at file "demo_app3/views/generic.pdf"

<<back Edit

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
{{
import os
from gluon.contrib.generics import pdf_from_html
filename = '%s/%s.html' % (request.controller,request.function)
if os.path.exists(os.path.join(request.folder,'views',filename)):
html=response.render(filename)
else:
html=BODY(BEAUTIFY(response._vars)).xml()
pass
=pdf_from_html(html)
}}