1

I've tried to convert Visio documents (2010, 2013) to SVG for use with Inkscape 0.91 in two different ways, with unsatisfactory results. The trouble is always with the flowed text being incorrect in Inkscape.

  1. Saving the Visio file as .SVG, and opening it in Inkscape. The flowed text appears wrapped, but only on one line, as in the following image (Visio 2013 is on the left, Inkscape on the right):
    Visio and Inkscape
  2. Opening the Visio (.vsdx) file with Inkscape Import. The text is not wrapped, and the rectangle is black (although the rectangle problem doesn't always happen in my diagrams).
    Visio file opened in Inkscape

The SVG output from Visio looks perfect inside a modern browser:
Screen shot of SVG image from Chrome

However, the SVG contains a simulated (manually wrapped) flow using, e.g., <tspan x="20.64" dy="1.2em" class="st3">:

    <g id="shape1-1" v:mID="1" v:groupContext="shape" transform="translate(18.375,-18.8899)">
        <title>Feuille.1</title>
        <desc>Here is some text that should wrap over several lines.</desc>
        <v:textBlock v:margins="rect(4,4,4,4)" v:tabSpace="42.5197"/>
        <v:textRect cx="45.3543" cy="65.6899" width="90.71" height="55.8207"/>
        <rect x="0" y="37.7795" width="90.7087" height="55.8207" class="st1"/>
        <text x="13.83" y="47.69" class="st2" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Here is some <tspan
                    x="6.65" dy="1.2em" class="st3">text that should </tspan><tspan x="20.64" dy="1.2em" class="st3">wrap over </tspan><tspan
                    x="13.87" dy="1.2em" class="st3">several lines</tspan>.</text></g>

It almost looks like Inkscape is ignoring the dy portion of the tspan, but I don't know enough about that to say more.

On Inkscape's Q&A forum I was told that SVG 1.1 doesn't support flowed text. Since practically all text in my Visio diagrams is flowed inside rectangles, is converting them to Inkscape/SVG therefore impossible until SVG supports flowed text?

The main reason I want to use Inkscape/SVG is that it is also a free command-line tool to convert SVG files to other files formats (PDF, PNG, etc.). This is very useful in my LaTeX-based typesetting environment using LyX.

I've been using Visio -> WMF/EMF as a partial workaround, because there's a converter to EPS in LyX. But it's also not perfect. Punctuation (commas, periods, apostrophes, etc.) in flowed text of the WMF/EMF is always positioned strangely, as if it's treated (kerned?) separately from the rest of the text. SVG seems to be a more modern and open standard, too.

  • 1
    I just tested with the development version. It's not a lot better there, but at least it looks right after opening (find out where to get it for your system at the bottom of inkscape.org/en/download ). Editing however doesn't work correctly (the cursor always stays in the first line, while letters are actually inserted into other lines...) The SVG file contains many visio-specific instructions, so it appears that Visio built its own flowed text implementation, that doesn't correspond to Inkscape's own flowed text. Don't know of any non-programmatical way to convert one into the other. – Moini May 13 '16 at 21:26
  • @Moinilein It's good to know that improvements are coming. – Fuhrmanator May 17 '16 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.