EPS is a specific format which will embed two sets of data. One is for every single app but illustrator that will open the eps file (including converted elements) and the other is for Illustrator as it will preserve special effects and native features.
That may explain the bump in size.
What do you mean by "too" large?
And if there are linked images in the icon by any chance, your options at the moment specify embedding. If that's the case, keep them linked?
Oh, here's a reason why you may experience a 'shocking' jump in file size. An SVG is an XML text document which is interpreted by Illustrator in a different way than most other documents that it opens.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
viewBox="0 0 200 200" enable-background="new 0 0 200 200" xml:space="preserve">
<circle fill="#FFFF00" stroke="#000000" stroke-miterlimit="10" cx="100.8" cy="105.7" r="64.1"/>
When Illustrator opens the SVG file, it makes the document structure its 'own' and re-creates the XML into Illustrator shapes, layers, etc. When you open a raw SVG and save it with Illustrator, you can use the "Preserve the Illustrator capabilities" checkbox to see what other great things AI will stick into the file.
When I did this with the above SVG code, it went from 6 lines of code to 1961 lines of code. A big increase. Now, as Loic said, when you save out an EPS from this, it would put the Illustrator part and the EPS part into the file. You're getting plenty of overhead, but that's the nature of EPS, I guess.
Here's our comparison:
Original SVG: 1K (6 lines)
Illustrator-Editable SVG: 146K (1961 lines)
Exported EPS: 405K (25847 lines)
1 person found this helpful
Oh, Wait...you made a mistake in you code at line 23 :
epsOptions.compatability = Compatibility.ILLUSTRATOR8;
It should be:
epsOptions.compatibility = Compatibility.ILLUSTRATOR8;
thank you, you save my day