Skip to main content
Participant
November 4, 2014
Question

SVG – Illustrator pushes artwork off artboard after saving.

  • November 4, 2014
  • 20 replies
  • 20760 views

Hi All,

I'm having an issue with SVGs and Illustrator that hopefully someone else knows a fix or has been having similar issues. Note, these SVG's are super simple icons, no text just basic shapes and I'm using CC2014. This is basically what happens…

1. Resize my artwork and artboard to the correct pixel dimension that I want.

2. Save out to SVG with default settings, Responsive unchecked.

3. Open SVG back up in Illustrator after hearing that my FED can't use the files and suddenly the artwork is miles off the art board.

4. Reposition the artwork again and save out with same settings.

5. Open up SVG to check it's on the artboard correctly, find that the artwork is once again miles off the art board.

Anyone know how to fix this? It's a pain in the butt and I've had to resort to using Sketch.app to open up my SVG's back up and then export them through Sketch.

Would love to just be able to use Illustrator exclusively instead of relying on Sketch to export. Any help much appreciated!

Cheers.

20 replies

tamm7621150
Participant
April 4, 2016
Participating Frequently
February 19, 2016

@Silly-V this is definitely not fixed. This issue was not just when creating a new document and saving it. The problem is with an SVG that was created with a previous version is all screwed up. Adobe blows. Which is why there company is starting to tank. Adobe has lost the care and respect for their customers that they used to have. Most people I know have stop using a lot of their products and have gone to open source software that is available. Our company has dropped them completely because of issues just like this. SVG is the future of a lot of design and to have this bug go unfixed for so long proves how crappy of a company they actually are. They started going downhill with Dreamweaver and the dumpster fire that it is. The entire company is garbage and only cares about collecting our money and not providing us with a usable program. As and application developer this lack of caring irritates the hell out of me.  Get it together Adobe or all the open source software out there is going to replace your insanely expensive and unusable software.

Silly-V
Legend
February 19, 2016

So it's not fixed? Blaskotron‌ said an old document was correctly boxed in the above comment, but I personally have not tested.

If you are an application developer who is irritated by this, why not channel your rage into a positive solution for all and create a plugin to properly export an SVG even better than their new & improved SVG export?

I would really like to have better gradient definitions control so that object's bounding can be used for relative %-based gradient dimensions, and it would be so dope to be able to live-test the artwork using the animation framework GSAP inside of Illustrator via the extension's HTML display. Also a cool thing would be to assign custom attributes and be able to view live XML just like in Inkscape!

Matter of fact if someone could also make controls in form of a timeline to be able to do basic keyframing with GSAP (somehow), it would bring the power of Flash (or Animate, rather) to Illustrator, making SVG web animation and web banner creation a breeze!

I always thought this would be a great idea, and I would have done this by myself if I had the technical skills and knowledge.

Participating Frequently
January 4, 2016

I think this might be fixed now as there was some work done to illustrator regarding svg including a new export to svg dialog box.

File > Export > SVG. Then you can open and reopen and save normally and art stays in place.

I also did not encounter the bug when doing the regular Save As method.

Inspiring
January 4, 2016

It is fixed if you author a new document with the new version of Illustrator CC, however it appears that if the document was authored with a previous version you are still screwed.

Inspiring
December 30, 2015

It is simply staggering that this is still broken. Adobe seem intent on sucking in new customers with new features while leaving howling bugs like this unfixed. And there is nothing any of us can do as we are now paying monthly.

Participant
November 4, 2015

I'm no expert... when attempting to troubleshoot an .svg transparency issue as well, I found out transparent elements need to be saved as a separate .svg files. Once I did that, my artwork also stopped moving off the canvas.

Participating Frequently
November 4, 2015

... transparent elements need to be saved as a separate .svg files.

Can you elaborate on that? Not sure what you mean. Thanks!

Participant
November 4, 2015

https://helpx.adobe.com/illustrator/using/svg.html

" If you want objects on different layers to appear transparent, adjust the opacity of each object instead of each layer. If you alter opacity at the layer level, the resulting SVG file will not display transparency as it appears in Illustrator."

Participating Frequently
October 27, 2015

This is still an annoyance for our team. Have to reset coordinates every time you update an SVG. If you preserve illustrator editing then it's double the file size.

Silly-V
Legend
November 18, 2015

I have discovered this painful bug, and it appears that Illustrator stores the (bad) viewBox with the document when it reads an SVG in, or exports an SVG out. When it reads in SVG in, the viewBox of the svg tag is set as the "set-in-stone" value for any following SVG exports! For example, I get a vector completely outside of my little artboard, and it's offset by a certain value, so I center the vectors on the artboard but the next export is not fixed at all. Then, if I had instead centered the artboard to my vectors which are outside somewhere on the pasteboard, this also fails! Saving the master .ai file as .eps, or .pdf in hopes that the viewBox would be reset to [0,0] as the top-left doesn't work because the svg-specific viewBox is horribly attached to the "AI" portion of those files.

So, I fix this by creating a brand-new document, at the desired size, and pasting the vectors inside. Save a new SVG, the bounds appear correct.

Therefore, I prefer to never work on SVG files from other sources by opening them in Illustrator. Rather, I make a new document and paste the vectors inside to get good control over the bounding box.

Using the "Use Artboards" feature when saving out multiple artboards from a single document as SVG, I have not yet had this problem so far. I will go back through and check to see if all my numbers are correct on my last export, though, to verify.
However, there is a way to accomplish this using multiple layers (one per artboard) and datasets, but it's quite complex so I'll write an article on it eventually.

Opening a foreign SVG and using the "Preserve Editing" feature when saving it, appears to work because it now stores the Illustrator document bounds in a special area that relates to Illustrator - so that when you open it in AI, the vector is centered properly on an artboard.

However, those in web design who may have to manipulate or animate this SVG may be frustrated because the viewBox and the art vectors are all offset by whatever number it is.

For example, the viewBox would be desired to have bounds such as viewBox="0 0 80 80" - but in the corrupt SVG export, they are something like viewBox="-248 351.8 80 80", which is exactly what happened to me.

Even though the vectors are centered when viewed in the browser, and even in AI when "Preserve Editability" is used, the numbers are not really cool for when you expect them to be at 0,0 for top/left. Here is an example of a circle which is drawn in these bounds:

Expected: <path fill="#43619C" d="M40,2C19,2,2,19,2,40s17,38,38,38s38-17,38-38S61,2,40,2z"/>

Actual: <path fill="#43619C" d="M-208,353.8c-21,0-38,17-38,38s17,38,38,38s38-17,38-38S-187,353.8-208,353.8z"/>

So, what happens is both the canvas box and the art are all offset by x amount, and also Illustrator puts the vectors somewhere off-center when "Preserve Editability" is not used. While it all looks okay and is probably okay for most static purposes, during those times when animation or some numbers comparison is important, this may be an issue. To be completely in control, I opt for creating a new document and pasting the vectors in. This could be automated with an action which creates a new document (the presets are stored in the recorded action) and vectors being pasted inside. Exact same thing can be done by placing the problem SVG into a document and embedding it as well.

Participating Frequently
November 18, 2015

Thanks for doing the detailed research and troubleshooting on this, and offering up some useful tactical workarounds!

Now, I hope that Adobe will read this if they weren't clear on what the problem was, and FIX THIS ANNOYING BUG!

Participating Frequently
October 22, 2015

Wow, coming up on a year and still no answer...

Just wanted to add that I see the same "moved off the artboard when you re-open" issue with illustrator vectors that have been saved as Smart Objects in Photoshop. Erratically offset from their artboards when re-opened to edit.

hungerSTAR
Participant
September 2, 2015

The only solution that I have found to work is to create a new Illustrator document and drag the artwork from the old AI or SVG file into this new document and then save it.

Participant
September 27, 2015

This worked for me.

The reason i was getting it is because of merging svg images. I would copy one image onto anothers artboard and then go from there. Found out that starting from a new artboard and then copying both images onto that artboard resolved all issues.

Known Participant
August 30, 2015

Hi,

I just wanted to stress that it’s still broken in the latest release of Illustrator CC 2015.1.0. Unbelievable!

The above workaround, while useful, means that the resulting SVG is quite a lot bigger and sometimes optimisers, like SVGO, barf on Illustrator Editing data

I do hope it’s gonna get fixed one day...

Regards

m.

Participant
June 22, 2015

Hello guys!

I spent one hour this morning suffering with this! (Mac OS X Yosemite - Adobe CC 2014)

It supposed to be easy to just remove the margins (Dead space) by using "Fit to Artwork Bounds" and saving as .svg to send to the developer, but I discovered that after saving them and re-opening to confirm that all the icons were ok, I was getting some of the vectors randomly outside the artboard and the artboard size was changed in all of them. (Total aleatory sizes)

After reading several forums and some of the tips here, I fixed it with a "combo" that you must apply on the settings while saving:


1) Uncheck "Use artboards"
2) Uncheck "Responsive"
3) Check 'Preserve Illustrator Editing Capabilities' (Thanks carolwoodman for the lastest post)



Even tough, on my preview of the finder it looks with a extra white space on the bottom, that is quite scary and in all of them

...but when I open them, they look perfectly fit on the artboard.
Really weird.


I hope that this help someone, and to solve the mystery of the preview issue.

Thanks!

ginnym96939390
Participant
June 23, 2015

GinaB's solution seems to be the only one I found that works too. The only problem is that the SVG file is about seven times larger when you preserve Illustrator editing. That was not true the older version I was using (CS6 :-)).