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²
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to