Re: [web2py] PDF view - set printing page size

2015-03-05 Thread Pavel
I am from Central Europe region with a lot of accented characters. U use your second solution: import sys reload(sys) sys.setdefaultencoding("utf-8") pdf.add_font('DejaVu', '',os.path.join(request.folder,'static', 'DejaVuSansCondensed.ttf'), uni=True) ... and now it is all working completely.

Re: [web2py] PDF view - set printing page size

2015-02-25 Thread José Luis Redrejo
2015-02-24 14:36 GMT+01:00 Pavel : > Really thanks José, > your "labels" app help me with understanding fpdf. My apps is working now. > You're welcome > "Little" problem is unicode characters. I tried examples from fpdf wiki > pages, but without success. > Fortunately all dynamic fields on our

Re: [web2py] PDF view - set printing page size

2015-02-24 Thread Pavel
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 -- R

Re: [web2py] PDF view - set printing page size

2015-02-23 Thread José Luis Redrejo
I think this could be useful for you: https://github.com/jredrejo/Labels-for-pyfpdf 2015-02-22 9:50 GMT+01:00 Pavel : > > Hallo, > I am making simple app for registrations and printing ID cards. I have > simple pdf view. For instance: > > {{ > import os > from gluon.contrib.generics import pdf_fr

[web2py] PDF view - set printing page size

2015-02-22 Thread Pavel
Hallo, I am making simple app for registrations and printing ID cards. I have simple pdf view. For instance: {{ import os from gluon.contrib.generics import pdf_from_html html = 'Today is: ' + str(request.now) =pdf_from_html(html) }} How to specify PDF page size for instance like credit card s