[cairo] cairo without X dependencies, server-side svg to png rendering?

Maarten Breddels dmon at xs4all.nl
Sun Apr 18 11:01:49 PDT 2004

> I've been looking for a long time for a library that would 
> render a decent
> subset of svg for use in web applications. Ideally, I would render png
> directly to http output, without temporary files.  I use python as a
> scripting language where bindings are available, but an 
> apache http module
> which would accept SVG text would be almost as useful.

I've been playing around with a Python script that uses cairo for
rendering, so far it only does a subset ofcourse, since the svg specs
are quite large. But maybe you are interested, I had to add some
functions to the python binding of James Henstridge (python-cairo
binding). So it is not possible to use the script with the current cvs
version. It should be possible to render to memory, and let PIL(Python
Image Lib.) create a png image from it. This is all quite slow ofcourse,
but some caching to harddisk should help.

I could send you my version of python-cairo together with the svg
rendering script. My current problem is that I can't get the orientation
of gradients right. It also misses a lot of simple things like <line>
<circle> tag etc, but they are easy to implement(which I'm willing to
do). All I need are some sample svg files. Let me know if you are

Greetings, Maarten

More information about the cairo mailing list