Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

So I am pretty much desperate by now.

I am a web developer and -designer, but I don't use Illustrator. I just don't need it at all. The file that I got from the graphic designer contains two artboards with several icons spread all over these. I need to export every single icon as SVG.

So I selected every object, clicked Object > Artboards > Fit to Selected Art and exported that. I was a little worried because the SVG Code I got from that was very bloated and had so many paths defined in it, that I couldn't add classes to it without having to fear that I am doing something wrong.

When I opened the exported svg to look if I did something wrong, the whole icon, wrapped by the artboard borders was there, with all the other icons below a grey overlay (!!!). So all the other paths were actually in every single SVG file.

I tried everything but it just doesn't work. I cant go in 50 files to delete all the code.

Any solutions?

share|improve this question
    
If each icon is in a separate layer, you could export each layer to a separate file with this script and then use @daugaard47 method. –  Bart Arondson Mar 10 at 0:08

1 Answer 1

Not sure I 100% understand your question, but sounds like you have many icons and only need one...?

  • Just create a new document in illustrator.
  • Copy over the icon you need.
  • Select the icon, then choose File > Document Setup > Edit Artboards
  • Then in the top left choose Presets: Fit to selected art. Then save as an .svg

If there are other icons/objects in the scene you have to delete them or the .svg will become bloated.

If you have to do this with all you icons it can be a very tedious task. I've been there.

Hope that helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.