{{
import os
from gluon.contrib.generics import pdf_from_html
html = 'Today is: ' + str(request.now)
=pdf_from_html(html)
}}
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Really thanks José,
your "labels" app help me with understanding fpdf. My apps is working now.
"Little" problem is unicode characters. I tried examples from fpdf wiki pages, but without success.
Fortunately all dynamic fields on our ID cars is numbers and characters without accent.
Thanks
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
pdf.add_font('DejaVu', '',os.path.join(request.folder,'static','DejaVuSansCondensed.ttf'), uni=True)