Difference in SVG clipboard code between Mac and Windows in v25.4
There has been a change in the SVG code format AI puts in the clipboard for Windows starting in v25.4.
I've been using the clipboard to paste designs into the Glowforge interface for the past 3+ years. it worked properly up until the most recent update. then I started having scaling issues.
I posted on the Glowforge site and found that people using the Mac in v25.4 aren't having the same issue. The Glowforge engineers looked at the SVG clipboard code for Mac and windows and figured out that the issue is that the clipboard code for Windows has changed.
This is the post on the Glowforge forums that explains the differences.
https://community.glowforge.com/t/paste-from-illustrator-coming-in-at-75-size/97704/28?u=shop
but here's the essence.
======
Here is the SVG code from a square created in MacOS on the current version of Illustrator. This SVG code can be pasted into the Design Library and opens as a 1" by 1" square as expected.
<svg id=“Layer_1” data-name=“Layer 1” xmlns=“http://www.w3.org/2000/svg%22 width=“1.01in” height=“1.01in” viewBox=“0 0 73 73”><defs><style>.cls-1{fill:#fff;stroke:#231f20;stroke-miterlimit:10;}</style></defs><rect class=“cls-1” x=“0.5” y=“0.5” width=“72” height=“72”/></svg>
Here is the SVG code from a square created in Windows on the current version of Illustrator. This code, when pasted into the Design Library, opens to a square that is approximately .75” by .75"
<svg id=“Layer_1” data-name=“Layer 1” xmlns=“http://www.w3.org/2000/svg” viewBox=“0 0 73.13 73.13”><defs><style>.cls-1{fill:#fff;stroke:#231f20;stroke-miterlimit:10;}</style></defs><rect class=“cls-1” x=“0.5” y=“0.5” width=“72.13” height=“72.13”/></svg>
The MacOS version is defining a width and height that can be applied to the layer; this is missing from the Windows version. This means there is no reference point to use when the Glowforge app scales the design. There are ways we try to scale appropriately in our software when this information is missing, but that’s dependent on the other information present. For instance, if the same SVG were exported and then uploaded, it would include information that the file came from Illustrator. This would fill in the blanks our software needs to understand the default dpi being used by the program, and how we can calculate that to match our app’s display.
========
Is there a specific reason that the SVG clipboard code on the mac is different? is there any way you can fix the Windows SVG clipboard code to work the way it used to? or at least give an option for it to work that way again?
-
jhenderson@lokion.com commented
I have noticed that the code copied to the clipboard coming from 25.4.1 is completely different from previous versions.