Re: [web2py] Re: utf-8 and pyfpdf

2012-01-05 Thread Martin Weissenboeck
Thank you. I had to change the following lines: 1247 table = TABLE( _border="0", _align="center", _width="50%, *rows") 1305 table = TABLE( _border="1", _align="center", _width="100%", *[head,foot, body]) 2012/1/4 Christopher Steel > French and English pdf examples (and some other

[web2py] Re: utf-8 and pyfpdf

2012-01-04 Thread Christopher Steel
French and English pdf examples (and some others if you dig a bit) http://code.google.com/p/uc-pdf/downloads/list

Re: [web2py] Re: utf-8 and pyfpdf

2012-01-03 Thread Martin Weissenboeck
Hi José, thank you. "latin-1" code is the answer! 2012/1/2 José Luis Redrejo Rodríguez > Hi Martin, I'm using this in the controller, without any problem: > > > # coding: utf8 > ... >from gluon.contrib.pyfpdf.pdflabels import PDFLabel > >import sys >reload(sys) >sys.setdefaultenc

Re: [web2py] Re: utf-8 and pyfpdf

2012-01-03 Thread Martin Weissenboeck
Thanks, that works! 2012/1/2 Massimiliano > Try this one: > > euro = chr(128) > > as euro char > > > > On Sun, Jan 1, 2012 at 11:29 PM, Martin Weissenboeck > wrote: > >> Now I have found that I have to convert the string: >> >> txt = 'äöü ß ÄÖÜ' >> txt = txt.decode('utf-8').encode('latin-1','re

Re: [web2py] Re: utf-8 and pyfpdf

2012-01-02 Thread José Luis Redrejo Rodríguez
Hi Martin, I'm using this in the controller, without any problem: # coding: utf8 ... from gluon.contrib.pyfpdf.pdflabels import PDFLabel import sys reload(sys) sys.setdefaultencoding( "latin-1" ) ... def label_parejas(): ...             text="%s\n%s\n%s %s\n%s" % (nombre

[web2py] Re: utf-8 and pyfpdf

2012-01-01 Thread Christopher Steel
You need to use a font that supports as well C.

Re: [web2py] Re: utf-8 and pyfpdf

2012-01-01 Thread Massimiliano
Try this one: euro = chr(128) as euro char On Sun, Jan 1, 2012 at 11:29 PM, Martin Weissenboeck wrote: > Now I have found that I have to convert the string: > > txt = 'äöü ß ÄÖÜ' > txt = txt.decode('utf-8').encode('latin-1','replace') > > > This new string will be written correctly into the p

[web2py] Re: utf-8 and pyfpdf

2012-01-01 Thread Martin Weissenboeck
Now I have found that I have to convert the string: txt = 'äöü ß ÄÖÜ' txt = txt.decode('utf-8').encode('latin-1','replace') This new string will be written correctly into the pdf-file.Is there a better way? No chance for the Euro-currency-symbol '€' Maybe there will be a full unicode charac