Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: reportlab and python 3

Reply
Thread Tools

Re: reportlab and python 3

 
 
Joel Rivera
Guest
Posts: n/a
 
      09-18-2012
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²
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reportlab and python 3 Laszlo Nagy Python 9 09-18-2012 05:33 PM
Client-server PDF creation with xtopdf, XML-RPC, ReportLab and Python vasudevram Python 1 10-04-2009 09:38 PM
Reportlab and Barcodes Josh Python 8 12-24-2008 09:04 AM
Which reportlab version for python 2.1.3? LizzyLiz Python 1 01-24-2008 06:37 PM
Python vacancies at ReportLab, London Andy Robinson Python 0 01-31-2004 11:28 PM



Advertisments