Thread subject: sK1 Project :: SVG to CGM issues

Posted by mathog on 22-12-2011 22:34

In Uniconvertor 1.1.5 when a particular SVG was converted these messages were emitted:

The design you tried to save in CGM Version 1 format
hit some limitations

- CGM has no Bezier curves. These are flattened

- CGM has no Gradients. These are filled black

- cgmaver doesn't save text. Text is converted
to Bezier curves

The thing is, CGM (the standard anyway) does support Bezier curves and text as text. Both of those are present in the reference set of CGM examples from the NIST:

I have also found that Uniconvertor is very picky about the <defs> section of SVG files made by Inkscape. Sometimes it is possible to clean up the defs with "vacuum defs" in Inkscape, other times not.

Try the attached bounding_line4_plain.svg example (it is an svg, n ot a zip, but this forum would not let me upload an svg) - uniconvertor doesn't like it (gives a mysterious message about "Parsing error: at least 2 colors required".) But load it into inkscape, do "vacuum defs","save", and then uniconvertor can read it, at least for converting to CGM. It still blows up trying to convert to WMF (line 91 in, IndexError: list index out of range). The CGM conversion, although it completes, isn't very satisfactory, all simple lines are missing, text is converted to paths (no reason here it could not stay as text, it just runs in straight lines, albeit at different angles), text size information is lost, some circles are lost, and the page size is changed (open the cgm in PPT and it is very much smaller than the same page loaded via other routes.)