SVG file format: default vs. needed for text flowed into frame

Post questions on how to use or achieve an effect in Inkscape.
ScapeGoat
Posts: 40
Joined: Tue Mar 19, 2013 9:36 am

SVG file format: default vs. needed for text flowed into frame

Postby ScapeGoat » Wed Nov 09, 2016 11:10 am

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., via File->Save or 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](http://www.inkscapeforum.com/viewtopic.php?f=5&t=31180) and
[StackExchange](http://graphicdesign.stackexchange.com/ ... into-frame).
Last edited by ScapeGoat on Wed Nov 09, 2016 2:18 pm, edited 2 times in total.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: SVG file format: default vs. needed for text flowed into frame

Postby prkos » Wed Nov 09, 2016 11:44 am

Flowing text into frames isn't yet in SVG spec, this is only an Inkscape feature for now, IIRC it may enter SVG2. So when saving as Plain SVG these objects get converted to a normal Text object. I expect them to remain in the same place though, but with hard line breaks.

I haven't used Connectors for some time, but I remember that it took a lot of tweaking, using groups and then still tweaking the text alignment within the group/rectangle. When styling/making it pretty wasn't an issue I used Dia. Dia is excellent with Connectors, although not as easy to use as Inkscape and only provides very simple styling options.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

ScapeGoat
Posts: 40
Joined: Tue Mar 19, 2013 9:36 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby ScapeGoat » Wed Nov 09, 2016 2:05 pm

Thanks, prkos. I understand that not all Inkscape features are part of the standard. I was just wondering if the reason for my problem is that the default SVG is plain SVG when using ctrl-S. If so, there should probably be a warning. Furthermore, while it seems for the moment that saving as Inkscape SVG preserves the two features I am using, I'm not *entirely* sure. This is because I seem to recall not seeing such wholesale loss of positioning information when saving in the past. Maybe the reason is that, in the past, the format used for ctrlS was Inkscape SVG for some reason. Which is why I was curious as to the default behaviour for saving via ctrl-S.

I looked at the svg file using a text editor, and while I saw some differences, I'm not sure how to tell whether the file was saved using plain SVG or Inkscape SVG.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: SVG file format: default vs. needed for text flowed into frame

Postby prkos » Thu Nov 10, 2016 6:58 am

If I'm not mistaken Ctrl + S is Save, and it does this in whatever format the file is already saved as, for example if you Save as PDF, and then do Ctrl + S it will open up the PDF popup you always see when saving as PDF.

But when I saved as Plain and then added some guides, and then saved, they were still there on reopen, meaning the last save was Inkscape SVG. I need to test more to figure out what is happening.

What do you think makes most sense to implement?

I expect Inkscape SVG file to always be larger than Plain SVG, so file size alone should tell you, although I need to test that as well :D

In the meantime here is a bug report that might be relevant here:
explanation of inkscape/plain SVG on 1st ever file save
https://bugs.launchpad.net/inkscape/+bug/262430

Official explanation:
http://wiki.inkscape.org/wiki/index.php/Frequently_asked_questions#What.2C_then.2C_is_.22Inkscape_SVG.22_as_opposed_to_.22Plain_SVG.22_when_saving_a_document.3F
extensions only affect how the document is edited, not how it looks
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby Moini » Thu Nov 10, 2016 7:15 am

@prkos: here's the FAQ that we keep up-to-date (the one from the Wiki is stale, Wiki is meant to transition to developer-docs only):
https://inkscape.org/en/learn/faq/#what ... -plain-svg
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: SVG file format: default vs. needed for text flowed into frame

Postby prkos » Thu Nov 10, 2016 9:32 am

I knew that :geek: :mrgreen:
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

ScapeGoat
Posts: 40
Joined: Tue Mar 19, 2013 9:36 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby ScapeGoat » Sun Nov 13, 2016 8:59 am

Thanks, prkos & Moini.

prkos, you described that if the file is of type SVG (file extension *.svg), then ctrl-S saves in Inkscape SVG format rather than plain SVG. This is consistent with the Stack Exchange thread linked to in my original post. I think this is a sensible implementation because plain SVG causes information loss. As long as you have the Inkscape SVG file, and hence you have all the details, you can always explicitly choose to save in plain SVG. The reverse is not true, so it's safer to default to Inkscape SVG. However, I believe that the fact that Inkscape SVG is the default should be documented.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby Moini » Sun Nov 13, 2016 9:03 am

There has also been some discussion about whether to move the other file types to 'Export as...', like gimp did, to prevent data loss.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

ScapeGoat
Posts: 40
Joined: Tue Mar 19, 2013 9:36 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby ScapeGoat » Mon Nov 14, 2016 12:36 pm

I think that would make a lot more sense.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: SVG file format: default vs. needed for text flowed into frame

Postby Moini » Mon Nov 14, 2016 12:38 pm

Developers couldn't come to an agreement there, so the discussion didn't really come to an end, it just kind of got forgotten...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”