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 asSVG
.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 singleSVG
file.I tried everything but it just doesn’t work. I cant go in 50 files to delete all the code.
Any solutions?
Answer
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.
Attribution
Source : Link , Question Author : Nachtfunke , Answer Author : daugaard47