I am for a generic.pdf I already have one for an app of mine that uses gluon/contrib/ markmin2pd.py (in plugin_wiki/views/plugin_wiki/page.pdf).
I think we need both a PDF helper and a generic.pdf On Sep 27, 9:43 pm, Mariano Reingart <[email protected]> wrote: > Great! > > I agree with your thoughts: > > A. Setting width attributes in SQLTABLE is not a nice hack, having a > easier way would enable one-liners reports! > Anyway, html renderer (using python HTMLParser) is complex and > limited, maybe using web2py HTML helpers directly(not serialized) > would be a better, simpler and more robust approach (leaving width > unnecesary), but this is a major redesign. > > B. PDF views would be great to separe presentation logic, but seems > views cannot be binary (and detecting the request extension in not so > clean either). There is a generic.pdf view that can be tested, but is > seems not working because some extra prints added by web2py templating > engine and/or some IO alteration/escaping. > > C. I think report classes (defining header and footer) should be in > modules to gain some performance. Also, there should be a simple > layout report class (header=report title, footer=report page), so we > can encapsulate common code, and later add that on pyfpdf packages or > maybe in web2py tools. > > If there is some concensus, we can make some patchs and try this alternatives. > > Best regards, > > Mariano Reingarthttp://www.sistemasagiles.com.arhttp://reingart.blogspot.com > > > > > > On Mon, Sep 27, 2010 at 10:44 PM, yamandu <[email protected]> wrote: > > Hi, I wrote a simple report the generates a PDF version using PyFPDF > > that comes now with web2py. > > > I´ts here:http://web2pyslices.com/main/slices/take_slice/99 > > > My goal is share and start a discussion to get this type of code > > better. > > So, please, test it and comment! > >

