: Remove transformations when exporting as SVG with Illustrator Is there a way to remove path/group transformations when exporting as SVG with Illustrator? My problem is similar to this one but
Is there a way to remove path/group transformations when exporting as SVG with Illustrator? My problem is similar to this one but the given solution is only for Inkscape.
More posts by @BetL875
4 Comments
Sorted by latest first Latest Oldest Best
Using Illustrator CC -- After trying several of these tips without success, I was able to finally convert/export to SVG:
1) Set Artboard's X and Y to 0:
2) Use Export As... and select to Use Artboards.
3) After clicking Export button, SVG Options window opens, and select following settings:
No more Transform/Expand errors! Hope this works for others :-)
As far as I can tell only rectangles and ellipses will have the 'transform' attribute applied to them...
Here is a simple square:
And here is its relevant bit of code:
<rect x="95" y="95" width="470" height="470" fill="none" stroke="#0f6fa3" stroke-miterlimit="10" stroke-width="24"/>
That's 116 characters.
Here, the same square rotated:
And its code:
<rect x="95" y="95" width="470" height="470" transform="translate(-99.59 147.65) rotate(-22)" fill="none" stroke="#0f6fa3" stroke-miterlimit="10" stroke-width="24"/>
That's 165 characters... Now the same square with a single anchor point added:
Resulting code:
<polygon points="635.92 459.86 200.14 635.92 24.08 200.14 142.31 152.38 459.86 24.08 635.92 459.86" fill="none" stroke="#0f6fa3" stroke-miterlimit="10" stroke-width="24"/>
And this last example weighs in at 171 characters...
So it seems that leaving the transform attributes alone may actually be more efficient anyhow...
I'm not sure there's a one-click fix, but I solved the issue when working with simple shapes and paths by using "Unite" button in the Pathfinder pallet. You should actually see the bounding box change rotation as you click it.
However, some primitive shapes (ellipse, rect) were exported by Illustrator with transforms even after applying Unite. I solved this in my project by altering the points of the shape just slightly using the direct select tool.
The key seemed to be getting illustrator to output the svg using a path or polygon tags rather than svg's native rect or ellipse.
Illustrator CC v. 19.2.1
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.