Re: reportlab and python 3

Discussion in 'Python' started by Joel Rivera, Sep 18, 2012.

  1. Joel Rivera

    Joel Rivera Guest

    On 2012-09-17 03:47, Laszlo Nagy wrote:
    > Reportlab is on the wall of shame. http://python3wos.appspot.com/
    >
    > Is there other ways to create PDF files from python 3? There is
    > pyPdf. I haven't tried it yet, but it seem that it is a low level
    > library. It does not handle "flowables" that are automatically split
    > across pages. It does not handle "table headers" that are repeated
    > automatically on the top of every page (when the table does not fit
    > on
    > a page). I need a higher level API, with features compareable to
    > reportlab. Is there such thing?
    >
    > Thanks,
    >
    > Laszlo


    On 2012-09-17 03:47, Laszlo Nagy wrote:
    > Reportlab is on the wall of shame. http://python3wos.appspot.com/
    >
    > Is there other ways to create PDF files from python 3? There is
    > pyPdf. I haven't tried it yet, but it seem that it is a low level
    > library. It does not handle "flowables" that are automatically split
    > across pages. It does not handle "table headers" that are repeated
    > automatically on the top of every page (when the table does not fit
    > on
    > a page). I need a higher level API, with features compareable to
    > reportlab. Is there such thing?
    >
    > Thanks,
    >
    > Laszlo


    I'm afraid that, no, and this is my story of suffering:

    I been looking for something like that since the past month, first I
    try to port a library pypdflib[1]
    with no success, cairo is not well supported yet and the different
    forks of PIL aren't working nicely
    with 3.2 also carries a lot of dependencies, so I desist on that.

    Then I try this pyfpdf [2] to improve another port, but.. I end up
    spending a LOT of time reading the
    PDF and PNG SPEC and trying to unphpfy the code (In fact I couldn't
    make it work png images with alpha mask),
    so I start to get desperate and I took another approach, wrap another
    command.

    First, I try with xhtml2pdf [3], but It does not have a great support
    for the css rule "@page"
    which is pretty indispensable for me and in general wasn't very nice to
    generate precise pdf's,
    the commercial alternative "prince" have some fame of being good but
    I'm not willing to spend
    $3,800 on the license [4], also exists a few other commercial
    alternatives like pdftron [5]
    which support python3.

    And then after all of that my current effort is wrapping FOP [6], but
    instead of using XSL I reuse
    mako to generate the fo file, I leverage the pain of writing XML by
    hand with mako which provides
    the fo: namespace and some other tricks, at the time it seems robust
    and feature rich because of
    the nature of xsl-fo, but who now's I'm just starting with this I'll be
    working in this approach
    the following weeks.

    And if by any mean you found a better alternative please let me know
    and if you are so kind
    put the answer in this [7] stackoverflow question.

    Cheers.

    [1]: https://github.com/cyraxjoe/pypdflib
    [2]: https://bitbucket.org/cyraxjoe/py3fpdf
    [3]: https://github.com/chrisglass/xhtml2pdf
    [4]: http://www.princexml.com/purchase
    [5]: http://www.pdftron.com/
    [6]: http://xmlgraphics.apache.org/fop/
    [7]: http://stackoverflow.com/q/12021216/298371
    --
    Rivera²
     
    Joel Rivera, Sep 18, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Robinson

    Python vacancies at ReportLab, London

    Andy Robinson, Jan 31, 2004, in forum: Python
    Replies:
    0
    Views:
    489
    Andy Robinson
    Jan 31, 2004
  2. Josh

    Reportlab and Barcodes

    Josh, Feb 8, 2005, in forum: Python
    Replies:
    8
    Views:
    6,980
  3. LizzyLiz
    Replies:
    1
    Views:
    322
    Mike Driscoll
    Jan 24, 2008
  4. vasudevram
    Replies:
    1
    Views:
    466
    vasudevram
    Oct 4, 2009
  5. Laszlo Nagy

    reportlab and python 3

    Laszlo Nagy, Sep 17, 2012, in forum: Python
    Replies:
    9
    Views:
    2,005
    Terry Reedy
    Sep 18, 2012
Loading...

Share This Page