Bug: exporting SVG's via exportFile(fileObjSingle, ExportType.SVG, svgOptions). has completely changed since 28.4
(macOS & Windows, latest versions) Beginning with Illustrator 28.4, SVG files exported via Javascript are in a very different format.
The following examples are exported with:
doc.exportFile(fileObjSingle, ExportType.SVG, svgOptions);
The SVG option for the format of the SVG is STYLEELEMENTS.
See attached captures for the differences.
There are many many changes:
- the style definitions are handled differently
- ID's now strip out characters like / or < instead of replacing them with entities
- the original names are included via data-name tags
- the comment from the 2nd line is now gone
- clipping paths are handled differently
I have built a complex program over many years that depends on special characters in the SVG ID's, and it is now completely broken.
Does anyone know how to get back the previous SVG export format?
Does anyone know if this is a bug that will be fixed?
-
Michael Vermeulen commented
The new SVG export adds a <tspan> around the text.
Opening this SVG with <tspan> gets you an additional <group> in Adobe Illustrator version 28
Can this not be disabled via an option so that a clean SVG is created again. -
Andrew Swift commented
This change functions as expected.
See Adobe's indirect response at https://community.adobe.com/t5/illustrator-discussions/svg-export-format-completely-changed-with-illustrator-28-4/m-p/14555729#M404557
-
Andrew Swift commented
I tried to post these with the original bug report but wasn't able to.