: SVG file format: default vs. needed for text flowed into frame I use two key features in my schematics: 1) Flow-into-frame (Alt-W) to get text wrap within a rectangle 2) Connectors When I save
I use two key features in my schematics:
1) Flow-into-frame (Alt-W) to get text wrap within a rectangle
2) Connectors
When I save the file, an SVG file is created. When I open it, all the text is detached from their rectangles and randomly located. The connector endpoints also seem to be randomly positioned. Every time I re-open my schematic I go fixing everything up.
I then tried explicitly saving as Inkscape SVG (after fixing everything up). When I re-opened the file, all seemed uncorrupted.
Q1) Is the default SVG format the plain SVG, i.e., when saving, either with File->Save or by using ctrl-S? I'm wondering if that explains the corrupted schematic when I re-opened my file.
Q2) Can I rely on Inkscape SVG to preserve the above two features that I use?
I am using Inkscape 0.48, and being in a locked down corporate environment, upgrading is not very practical.
I've posted this to the
inkscape forum and
StackExchange.
More posts by @Hamm6457569
1 Comments
Sorted by latest first Latest Oldest Best
SVG connectors and text flows are not standard SVG
Both SVG connectors and flow-into-frame are actually not supported by the SVG specification. Inkscape supports these features by storing additional information that it needs in the inkscape namespace in the SVG file.
The Inkscape SVG file format will support these Inkscape's extensions to the SVG language, assuming you are viewing the SVG in Inkscape or a program that understands those extensions. Plain SVG removes that special namespaced data, which is why you are seeing a formatting loss.
Responses to your questions
Q1) Is the default SVG format the plain SVG, i.e., when saving, either with File->Save or by using ctrl-S? I'm wondering if that explains the corrupted schematic when I re-opened my file.
The default format is Inkscape SVG. You must explicitly save as a plain SVG. If you save as a plain SVG, make some changes, and then press Ctrl + S, it will be saved as an Inkscape SVG, not plain.
Plain SVG generated by Inkscape is generally not useful. The primary use-case for it is if you need to process an SVG file by another application that chokes on all the inkscape namespaced stuff. Since Inkscape SVG files do you namespaces to extend features, most XML applications shouldn't have issues and will just ignore the extraneous data.
Q2) Can I rely on Inkscape SVG to preserve the above two features that I use?
Yes and no. In my experience, connectors were unreliable in previous versions of Inkscape.
I'd recommend using normal paths instead of connectors and snapping them to objects. For text, I avoid flowing text like the plague and just use normal SVG text objects (which you can create by just clicking with the text tool instead of clicking and dragging). Text flows will explode if the SVG is used in a browser or Apache FOP.
If the diagram is very complicated, you can use Libreoffice Draw to create it, and then save it as an SVG file, then do whatever additional work (if any) is needed in Inkscape. Microsoft's Visio is another option.
Caution
While things like text flow are very useful, if you need to use the SVG file directly by another program, such as a web browser, there is a good chance it will explode and look crazy.
The most common way to deal with these programs are (1) export a PNG and use that instead, (2) Convert troublesome content (like flowed text) to paths, and (3) avoid using those features.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.