there should be no dependence with plugin_wiki.

I would take two concurrent indepenent non-exclusive approaches:

1) look into gluon.html

DIV(...).flatten(render_markmin)

and make a

DIV(...).flatten(render_pdf)

2) look into markmin2latex.py

and make a

markmin2pypdf.py

(notice that is already a markmin2pdf.py which uses markmin2latex.py).

Massimo


On Sep 28, 10:39 am, yamandu <[email protected]> wrote:
> I agree we need both.
> But how we are going to achieve this?
> Will we need plugin_wiki?
>
> On Sep 28, 10:45 am, mdipierro <[email protected]> wrote:
>
> > 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!
>
>

Reply via email to