html2pdf incredibly slow

2,548 views
Skip to first unread message

erikcw

unread,
Dec 17, 2008, 4:59:41 PM12/17/08
to Pisa XHTML2PDF Support
Hi all,

Are there any things I can do to boost the performance of html2pdf? I
just set it up on an ubunutu server running on amazon ec2 and it is
taking 10 minutes to produce a 4 page pdf (pdf contains one image at
the top (header) and an html table).

I'm running 3.0.29 on python 2.5.

Thanks!
Erik

Dirk Holtwick

unread,
Dec 18, 2008, 5:15:15 AM12/18/08
to xhtm...@googlegroups.com
Hi,

that's really slow, too slow if you ask me ;) Are you sure the time is
spend in xhtml2pdf? Maybe the image is of very big size? Try to reduce
the dimensions of it and convert it to JPG. For the moment I don't see
any other chance to get it faster...

Cheers
Dirk

erikcw schrieb:

vince

unread,
Jan 4, 2009, 6:43:53 PM1/4/09
to Pisa XHTML2PDF Support
i tried to convert a long html with a thousand line of

<div>hello</div>

and it took over a minute.


On Dec 18 2008, 6:15 pm, Dirk Holtwick <dirk.holtw...@gmail.com>
wrote:

Dirk Holtwick

unread,
Jan 5, 2009, 1:53:49 PM1/5/09
to xhtm...@googlegroups.com
Hi Vince,

this is very unusual. Even XHTML2PDF is not very fast the example should
take longer than 10 seconds on a normal recent machine.

Anyways, caching should be used if XHTML2PDF is in production use to
minimize time consumption. E.g. if you often render a PDF on a web
server with the same content try to cache it and deliver the
pre-rendered file!

Cheers
Dirk

vince schrieb:
Reply all
Reply to author
Forward
0 new messages