[cairo] SVG to EMF quality

Jan Struyf jan.struyf at cs.kuleuven.be
Thu Sep 3 13:28:35 PDT 2009


Dear Shixin Zeng,

> I've produced some pictures with matplotlib for my paper, which 
> prefers enhanced MetaFile (EMF). However, current maplotlib 
> doesn't support EMF output, but svg. So I tried to convert svg 
> to emf via cairo, as mentioned in this 
> thread:http://lists.cairographics.org/archives/cairo/2009-January/016215.html
>
> But the problem is that the quality of the output emf file is 
> pretty low. Is this caused by my badly programming or the 
> limitation of this method itself? Thanks

I think the Cairo Win32 backend converts most operations to 
bitmaps, which causes the poor quality EMF files. Support for 
GDIPlus on Windows could make high quality EMF output possible, 
but it is controversial because GDIPlus comes, as far as I know, 
only by default with Microsoft Visual C and is not available by 
default in MingW/GCC. Here is an old track on this topic:

<http://lists.cairographics.org/archives/cairo/2005-January/002689.html>

I'm not sure what the current status is.

You could consider using "pstoedit", which produces pretty decent 
EMF files, especially with the shareware plugin. You can find 
this software here:

<http://www.pstoedit.net/>

I hope this helps.

Best,

Jan

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


More information about the cairo mailing list