Re: [web2py] KeyError on pyfpdf

2012-07-17 Thread Mariano Reingart
On Mon, Jul 16, 2012 at 5:08 PM, thinkwell wrote: > Well, me again. I decided that I wanted to use points as measurements > instead of percentages, so now it barfs with an AttributeError. > > > > from gluon.contrib.pyfpdf import FPDF, HTMLMixin > from gluon.html import * > > > pets = TABLE(_width=

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
No, the "em" still raises an AttributeError. In the post above, I've included all the code to duplicate the problem... On Monday, July 16, 2012 4:17:48 PM UTC-4, Derek wrote: > > Try to use "em", see if you still get the same problem. > > 1em = 12pt > > http://www.getallfix.com/2011/11/convert-em

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread Derek
Try to use "em", see if you still get the same problem. 1em = 12pt http://www.getallfix.com/2011/11/convert-empxpt-and-in-css/ On Monday, July 16, 2012 1:08:13 PM UTC-7, thinkwell wrote: > > Well, me again. I decided that I wanted to use points as measurements > instead of percentages, so now

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
Well, me again. I decided that I wanted to use points as measurements instead of percentages, so now it barfs with an AttributeError. from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.html import * pets = TABLE(_width="720pt") pets.append(TR(TH('Dogs', _width="72pt", _align="left")

Re: [web2py] KeyError on pyfpdf

2012-07-16 Thread thinkwell
Thanks Mariano & Alan. Adding width to TD or TH tags did resolve the problem using the original html.py file without the fix implemented.*(Mariano, I tried installing your script and at this point it still fails when no width is specified. Another little issue, os.startfile() seems to be a Wind

Re: [web2py] KeyError on pyfpdf

2012-07-15 Thread Mariano Reingart
On Sat, Jul 14, 2012 at 5:06 PM, thinkwell wrote: > Hello everyone, > > I'm experimenting with pyfpdf with HTML formatting, but it's not going so > well. Is a bit buggy. For example, this code generates a KeyError: 'width'. > > {from gluon.contrib.pyfpdf import FPDF, HTMLMixin > from gluon.html im

[web2py] KeyError on pyfpdf

2012-07-14 Thread thinkwell
Hello everyone, I'm experimenting with pyfpdf with HTML formatting, but it's not going so well. Is a bit buggy. For example, this code generates a KeyError: 'width'. {from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.html import * header = HEAD('html2pdf', _align='center') pets = TA