vectorpea icon indicating copy to clipboard operation
vectorpea copied to clipboard

SVG export with attributes described as SVG, not as inline styles

Open ericemc3 opened this issue 1 year ago • 4 comments

Many softwares cannot properly import SVG files with SVG inline styles (such as transform for instance).

Would it be possible to avoid inline styles with the SVG export?

ericemc3 avatar Feb 10 '25 17:02 ericemc3

How would you like the style to be declared? Could you provide a sample SVG XML text?

photopea avatar Feb 10 '25 17:02 photopea

Here is an extract from an SVG export with Vectorpea, with inline SVG styles:

<text id="Oui, tout à fait 13 %" style="transform: matrix(1,0,0,1,1143,495.141)" >
			<tspan x="6" y="13.5" class="t5">Oui, tout à fait</tspan><tspan  y="13.5" class="t6">
</tspan>

A better version, more suitable for import in powerpoint for instance would be:

<text id="Oui, tout à fait 13 %" transform="matrix(1 0 0 1 1143 495.141)">
    <tspan x="6" y="13.5" class="t5">Oui, tout à fait</tspan><tspan y="13.5" class="t6"></tspan>
</text>

ericemc3 avatar Feb 10 '25 19:02 ericemc3

Are you sure that Powerpoint can handle the second case, but can not handle the first case?

photopea avatar Feb 10 '25 19:02 photopea

Yes indeed, i asked ChatGPT to clean the vectorpea export, and the cleaned version is properly imported in Powerpoint.

Here are both files:

pie_export_vectorpea.zip

It can also be checked with Inkscape where you can import svg files

ericemc3 avatar Feb 10 '25 20:02 ericemc3