Render HTML?
Terry Hancock
hancock at anansispaceworks.com
Wed May 8 03:28:38 EDT 2002
I have a need to render some HTML to an image format
for a project I'm working on. I've tried html2ps combined
with ImageMagick, and it might be good enough, but
I do have some complaints:
* html2ps is in Perl, which introduces a new language
dependency (of course just about any web server will
probably have Perl anyway).
* It chokes on a lot of modern web pages, especially
those with frames or javascript.
It appears that one might be able to use Gecko (the
rendering engine from Mozilla), but it's not clear to
me how much work would be involved in interfacing it
to my Python-based program, or whether any of this
work has already been done.
I can run html2ps using os.system() or popen() calls --
a similar interface, or better yet, a Python API,
would be nice.
It's not too critical an application, so I might just
stick to html2ps, if it's too hard to do something
else. But it only works about 80% of the time, and
sometimes it actually hangs (memory problems?).
Any ideas, pet projects, etc?
Cheers,
Terry
--
------------------------------------------------------
Terry Hancock
hancock at anansispaceworks.com
Anansi Spaceworks
http://www.anansispaceworks.com
------------------------------------------------------
More information about the Python-list
mailing list