[cairo] PyCairo SVG/PDF support on Windows?

Dominic Lachowicz domlachowicz at gmail.com
Thu Aug 3 08:59:11 PDT 2006


Tor, the GTK+-on-Win32 guy, has librsvg 2.14.4 and friends on his
Windows downloads page. It's not a drop-in replacement for Pycairo or
whatever you're using, but perhaps it'll fit your needs.

http://www.gimp.org/~tml/gimp/win32/downloads.html

Best of luck,
Dom

On 8/3/06, Carl Worth <cworth at cworth.org> wrote:
> On Wed, 5 Jul 2006 01:29:25 +0200, "Michael Knopf" wrote:
> >
> > I've been looking for a python based possibility to load svg data and render
> > it to bitmap (png) and pdf files at the same time. I ended up with Cairo and
> > already got it working so far on my linux box. But it does not work on
> > Windows, neither works the example code "svgconvert.py". The submodule svg
> > is missing. The readme says that it is only aviable if certain libs are
> > installed. It seems like libs for SVG support and PDF are missing.
>
> I looked into this a bit and apparently pycairo includes a "cairo.svg"
> module that requires libsvg-cairo.
>
> That's not a good situation for two reasons:
>
> 1) Pycairo should really bind only the functionality of cairo. Cairo
>    itself does not include SVG parsing, so pycairo shouldn't include
>    a cairo.svg module that adds that.
>
> 2) The libsvg-cairo library is totally unmaintained.
>
> So instead, librsvg exists which is a library that supports much more
> of the SVG specification than libsvg-cairo did, (which originally was
> forked from a much older version of librsvg). And recent versions of
> librsvg also render through cairo.
>
> I'm also told that python bindings for librsvg exist. This is good and
> as it should be: separate bindings for separate libraries.
>
> Of course, the python bindings for librsvg and for cairo should be
> made to work smoothly together. I don't know if that's the case
> currently, but I hope so.
>
> > Could I get a list of what I need to install on my windows machine to get
> > svg->png and svg->pdf to work? Are there binaries or do I need to compile it
> > myself (never have done that on Windows before).
>
> I don't know anything about what exists in pre-compiled form for the
> Windows platform. As you find stuff though, feel free to put notes
> into the cairographics.org web pages so that others can find it more
> easily than you did.
>
> And have fun with cairo!
>
> -Carl
>
> PS. One thing that might be a bit more tricky with librsvg (compared
> to libsvg-cairo) is that it has dependencies on at least glib, (and
> maybe GTK+ as well), so it will require those libraries to also be
> available. (This is one aspect of the libsvg-cairo fork that
> unfortunately didn't make it into the cairo-ification of librsvg).
>
>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo
>
>
>


-- 
Counting bodies like sheep to the rhythm of the war drums.


More information about the cairo mailing list