I've been testing some PDF generation code with
pisa (sits atop ReportLab) and for some of our documents
it was taking over 5 minutes to render. I passed the
same HTML to DocRaptor and had the PDF on my
machine in 8 seconds!
I then discovered there was no Python wrapper for
their API so I created python-docraptor and have
just pushed a release to pypi[1].
It's MIT licensed and available on GitHub[2] too.
Any other PDF generation experiences people
would like to share?
Thanks,
-John
[1] http://pypi.python.org/pypi/python-docraptor/
[2] https://github.com/jkeyes/python-docraptor
On the topic of PDF generation, if someone is looking for a internally
hosted solution, (albeit more heavy-weight) way to do HTML->PDF,
that's faster & supports more html/css than Pisa, I'd recommend taking
a look at http://code.google.com/p/wkhtmltopdf/. It uses headless
webkit to render the HTML/CSS and print to PDF. Python bindings
available at http://pypi.python.org/pypi/wkhtmltopdf/
Cheers,
Tim ^,^
> --
> You received this message because you are subscribed to the Google Groups "Python Ireland" group.
> To post to this group, send email to python...@googlegroups.com.
> To unsubscribe from this group, send email to pythonirelan...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pythonireland?hl=en.
>
>
Very true, I had some decent success with it. DocRaptor
uses Prince XML which provides a lot of additional features
(e.g. disable printing, font embedding, bookmarks,
header and footers, etc.)
-John
[1] http://www.princexml.com/doc/8.0/
I guess DocRaptor subscription based licensing is a nice alternative
to Prince's license fee. :-)
A cheaper way to get started anyway, if number of
docs per month increases rapidly, it might be time
to reconsider.
One other plus of DocRaptor is their xls generation
from HTML tables.
BTW, I'm not affiliated with DocRaptor at all.
-John