Author Topic: Error with an SVG file created with Inkscape at a webapp  (Read 895 times)

February 01, 2019, 05:00:14 AM
Read 895 times

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
HI I'm Rainer and lucky that I found this community.
 :)

I'm using an online webapp for editing my SVG's. This import to the canvas works without problems using an SVG file created with Illustrator.
Please compare: http://cloud.ranala.com/8ac5e20494c1

When I want to import an SVG file, which was created by Inkscape I get an additional vertical bar in my canvas on the left side:
Compare the red marked bar in this file, please: http://cloud.ranala.com/9c77852b20b9

I tried to examine this issue, but don't have any idea anymore. The error appears when saving the file as normal SVG as well as Inscape SVG.

Thanks in advance
  • 0.92
  • Windows 10 PRO 64bit

February 01, 2019, 05:39:30 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

We would need to see the SVG file which has the extra line.  Actually it might be helpful to have both SVG files.  You can attach them here (use the Reply button, and not Quick Reply, then look below the message box and click on "Attachments") or upload them anywhere and give us the link.

Are those 2 images supposed to be the same?  Because I notice it's not just the gray line which is different.

Just curious why you're using the web app for editing.  Does it provide some feature which Inkscape doesn't?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 01, 2019, 06:05:50 AM
Reply #2

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
Thanks for your quick reply, brynn
 :D

To your question: to show it to clients it's better to use a webapp, so you don't have to install something on clients devices

Here a screen shot and the original SVG file
  • 0.92
  • Windows 10 PRO 64bit

February 01, 2019, 06:07:34 AM
Reply #3

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
And here, how it looks in my canvas.

It seems, that the grey vertical bar moved to the left
  • 0.92
  • Windows 10 PRO 64bit

February 01, 2019, 06:19:51 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Ok, I see it now.  I thought you meant there was a new line that you didn't know where it was coming from.

I notice that the whole image is in a group.  Is it still in a group when you open it in the web app?  I would have to wonder why that one object was moved, if it was in a group.

Can anyone have access to that web app, or does it need membership or something?  I'd like to look at the image when it's opened in that app, if possible.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 01, 2019, 06:25:48 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hhmm, the XML for this file looks strange.  Was there ever some text in this file?

Is the SVG file that you shared the one you made originally in Inkscape?  The XML doesn't look right, although I'm not sure exactly what it means.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 01, 2019, 07:51:42 AM
Reply #6

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
No, the first (original) file '1.svg' was created with Illustrator - size 64 x 64
1.svg
*1.svg
(4.1 kB - downloaded 245 times)

With Inkscape I changed sizes and colors and got file 'inkscape17_170x384.svg'
inkscape17_170x384.svg
*inkscape17_170x384.svg
(5.04 kB . 170x384)
(viewed 243 times)


@brynn - sent you PM

  • 0.92
  • Windows 10 PRO 64bit

February 01, 2019, 09:34:58 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
How did you get the drawing to Inkscape?  Did you open the Illustrator SVG file with Inkscape?  Or did you have the Illustrator SVG file open in Illustrator, and copy it to an Inkscape document?

Ok, nevermind.  I have an idea.  Open the SVG, and copy the drawing.  It looks like it's all in a group, so it should be easy.  Then open a new Inkscape document and paste it in.  Save it, and try opening that in your web app.

The process gets rid of the weird XML that I see, and so maybe it will solve the problem??  It's easy enough to try it, I guess.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 01, 2019, 03:21:41 PM
Reply #8

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
The XML is fine. The web app has a bug. To get rid of the issue, convert the rectangle that makes the zipper to a path, then use the arrow key to move it up once, and the down arrow key to move it down again.

This will get rid of the transform attribute that the web app cannot deal with.

If you want to continue using it (what for? Every browser can display SVG files better than that!), you'll probably experience this issue in more cases, and in some, it's not fixable as easily as in this case.



February 01, 2019, 04:24:26 PM
Reply #9

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
If you want to continue using it (what for?

to show it to clients it's better to use a webapp, so you don't have to install something on clients devices

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 02, 2019, 11:00:00 AM
Reply #10

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
@brynn : please use complete quotes.

Quote (selected)
Every browser can display SVG files better than that!

February 03, 2019, 12:43:58 AM
Reply #11

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
Thanks Moini for jumping in.
 :)

Allow me to sort all, because it‘s a little bit confusing.
Here some screenshots:
1. is the original file '1.svg' (64 x 64)
2. is the file modified (from 1.svg) with Illustrator (size and colors) 'ill-1-170x384.svg'. When I insert this file in the canvas of my webapp it appears correctly
3. is the file modified (from 1.svg) with Inkscape (size and colors) 'inkscape17_170x384.svg'. When I insert this file into the canvas I get the gray bar, moved to the left - see screenshot 4
4. is how it looks on my canvas after inserting the modified files. Left the file, created with Illustrator (screen 2) and right the file, created with Inkscape (screen 3)

So for me it seems, that the issue is caused by using Inkscape, something must me different in the way to handle and save it after changing size and color, because, if I use Illustrator I don't get this error.

For comparing: you'll find original (1.svg), Illustrator modified SVG (ill-1-170x384.svg) and Inkscape modified SVG (inkscape17_170x384.svg) files below

« Last Edit: February 03, 2019, 01:14:30 AM by rainer »
  • 0.92
  • Windows 10 PRO 64bit

February 03, 2019, 06:51:06 AM
Reply #12

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
Both applications (AI and Inkscape) create valid SVG files.

The webapp isn't able to interpret the full range of the SVG specification.

I have shown you a way to fix it (actually, two).

I don't know how else I can be of help.

February 03, 2019, 07:05:09 AM
Reply #13

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
Thanks Moini,

the question remains unanswered, why a file created by Illustrator works on my web app and the one I created with Inkscape, not

With both programs I did the same, changed the size and some colors
« Last Edit: February 03, 2019, 07:47:28 AM by rainer »
  • 0.92
  • Windows 10 PRO 64bit

February 03, 2019, 09:34:00 AM
Reply #14

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I think what she's saying is that there's a way in which Inkscape uses SVG (a particular SVG code) which your web app doesn't recognize.  Apparently your file created in Illustrator does not use the same kind of SVG code that Inkscape uses. 

Even though you did the same kinds of things in both files, Inkscape and Illustrator use different SVG codes that do the same thing.

From what I understand that Moini said, the problem is related to a transform attribute (see message #8).  For this particular file, you can get rid of the transform attribute.  But unless you fix the problem in the web app, you'll see problems with any file using this particular transform attribute.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 03, 2019, 09:40:12 AM
Reply #15

rainer

  • Sr. Newbie

  • Offline
  • **

  • 7
Now I got it. Sometimes it's hard to understand relations when the basics are missing.
 :wm:

Thanks for your patience
  • 0.92
  • Windows 10 PRO 64bit