python-docraptor

22 views
Skip to first unread message

John Keyes

unread,
Nov 29, 2011, 9:42:36 AM11/29/11
to python...@googlegroups.com
Hi,

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

Tim Kersten

unread,
Nov 29, 2011, 10:44:11 AM11/29/11
to python...@googlegroups.com
Nice! :-)

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.
>
>

John Keyes

unread,
Nov 29, 2011, 11:06:30 AM11/29/11
to python...@googlegroups.com
> 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/

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/

Tim Kersten

unread,
Nov 29, 2011, 11:56:25 AM11/29/11
to python...@googlegroups.com
On Tue, Nov 29, 2011 at 16:06, John Keyes <john...@gmail.com> wrote:
>> 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/
>
> 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. :-)

John Keyes

unread,
Nov 29, 2011, 12:16:13 PM11/29/11
to python...@googlegroups.com
>> 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.)
>
> 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

Reply all
Reply to author
Forward
0 new messages