0xN1C0 Posted June 13, 2023 Posted June 13, 2023 Hello, I like to export my graphics in SVG through the export menu. Having multiple artboards and wanting to export them all at once, I got interested in the export persona tool. Isn't it possible to export (with export persona) SVGs with flatten transforms without transform matrix and useless tags? Normal export: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" viewBox="0 0 70 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <path d="M29.06,42.236L40.94,42.236L42.596,46.844C42.716,47.18 42.896,47.462 43.136,47.69C43.376,47.918 43.712,48.032 44.144,48.032C44.552,48.032 44.906,47.912 45.206,47.672C45.506,47.432 45.656,47.108 45.656,46.7C45.656,46.484 45.596,46.208 45.476,45.872C45.356,45.536 45.272,45.284 45.224,45.116L37.268,23.912C37.076,23.36 36.806,22.898 36.458,22.526C36.11,22.154 35.624,21.968 35,21.968C34.376,21.968 33.89,22.154 33.542,22.526C33.194,22.898 32.924,23.36 32.732,23.912L24.776,45.116C24.728,45.284 24.644,45.536 24.524,45.872C24.404,46.208 24.344,46.484 24.344,46.7C24.344,47.108 24.494,47.432 24.794,47.672C25.094,47.912 25.448,48.032 25.856,48.032C26.288,48.032 26.624,47.918 26.864,47.69C27.104,47.462 27.284,47.18 27.404,46.844L29.06,42.236ZM39.968,39.5L30.032,39.5L34.964,25.64L35.036,25.64L39.968,39.5Z" style="fill-rule:nonzero;"/> <path d="M67,12.6L67,57.4C67,62.698 62.698,67 57.4,67L12.6,67C7.302,67 3,62.698 3,57.4L3,12.6C3,7.302 7.302,3 12.6,3L57.4,3C62.698,3 67,7.302 67,12.6Z" style="fill:none;stroke:black;stroke-width:6px;"/> </svg> Export with export persona: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" viewBox="0 0 70 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <g transform="matrix(1,0,0,1,-1170,0)"> <g transform="matrix(0.0625,0,0,0.189189,1096.88,0)"> <rect id="KEYCAP_A" x="1170" y="0" width="1120" height="370" style="fill:none;"/> <clipPath id="_clip1"> <rect id="KEYCAP_A1" serif:id="KEYCAP_A" x="1170" y="0" width="1120" height="370"/> </clipPath> <g clip-path="url(#_clip1)"> <g transform="matrix(16,0,0,5.28571,1118.99,84.7558)"> <path d="M32.248,26.201L44.128,26.201L45.784,30.809C45.904,31.145 46.084,31.427 46.324,31.655C46.564,31.883 46.9,31.997 47.332,31.997C47.74,31.997 48.094,31.877 48.394,31.637C48.694,31.397 48.844,31.073 48.844,30.665C48.844,30.449 48.784,30.173 48.664,29.837C48.544,29.501 48.46,29.249 48.412,29.081L40.456,7.877C40.264,7.325 39.994,6.863 39.646,6.491C39.298,6.119 38.812,5.933 38.188,5.933C37.564,5.933 37.078,6.119 36.73,6.491C36.382,6.863 36.112,7.325 35.92,7.877L27.964,29.081C27.916,29.249 27.832,29.501 27.712,29.837C27.592,30.173 27.532,30.449 27.532,30.665C27.532,31.073 27.682,31.397 27.982,31.637C28.282,31.877 28.636,31.997 29.044,31.997C29.476,31.997 29.812,31.883 30.052,31.655C30.292,31.427 30.472,31.145 30.592,30.809L32.248,26.201ZM43.156,23.465L33.22,23.465L38.152,9.605L38.224,9.605L43.156,23.465Z" style="fill-rule:nonzero;"/> </g> <g transform="matrix(16,0,0,5.28571,-17550,0)"> <path d="M1237,12.6L1237,57.4C1237,62.698 1232.7,67 1227.4,67L1182.6,67C1177.3,67 1173,62.698 1173,57.4L1173,12.6C1173,7.302 1177.3,3 1182.6,3L1227.4,3C1232.7,3 1237,7.302 1237,12.6Z" style="fill:none;stroke:black;stroke-width:6px;"/> </g> </g> </g> </g> </svg> Thank you for your help! Quote
v_kyr Posted June 13, 2023 Posted June 13, 2023 Did you already tried it out with setting up "SVG Flatten" as SVG export format in the Export Persona? Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
0xN1C0 Posted June 13, 2023 Author Posted June 13, 2023 Yes this gives me a rasterised image. Following code: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" viewBox="0 0 70 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <g transform="matrix(1,0,0,1,-1170,0)"> <g transform="matrix(1,-0,-0,1,1170,-0)"> <use xlink:href="#_Image1" x="0" y="0" width="70px" height="70px"/> </g> </g> <defs> <image id="_Image1" width="70px" height="70px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAADuUlEQVR4nO2cP08UQRiHnztjo55cSKDQRCzUQkvBKCDaSLTQAisKhWihnX4B/Ax2IkZoxPins9fE2BjBaGUBGFAIFcWpiRYCZzEDN3fOzB3H7sxwN08yye7s7M77/m7e3bnZnclgJwucBk4BnTIdAXZVOS801oA5YFqmD8B7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2Pxri5Ki3cdZWcu3jVLafGuKaos3vUPwLJ56xl2ozoAAAAASUVORK5CYII="/> </defs> </svg> Quote
v_kyr Posted June 13, 2023 Posted June 13, 2023 32 minutes ago, 0xN1C0 said: Yes this gives me a rasterised image. Looks like a bug to me, as I would usually expect it to just flatten transform the SVG code then and not to rasterize those portions as base64 embedded image portions! When I tried out "SVG (for export)" under ADe v1 in Export Persona settings, it generated it as I would usually had expected it to be for the flatten option here ... <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" viewBox="0 0 70 70" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"> <path d="M29.06,42.236L40.94,42.236L42.596,46.844C42.716,47.18 42.896,47.462 43.136,47.69C43.376,47.918 43.712,48.032 44.144,48.032C44.552,48.032 44.906,47.912 45.206,47.672C45.506,47.432 45.656,47.108 45.656,46.7C45.656,46.484 45.596,46.208 45.476,45.872C45.356,45.536 45.272,45.284 45.224,45.116L37.268,23.912C37.076,23.36 36.806,22.898 36.458,22.526C36.11,22.154 35.624,21.968 35,21.968C34.376,21.968 33.89,22.154 33.542,22.526C33.194,22.898 32.924,23.36 32.732,23.912L24.776,45.116C24.728,45.284 24.644,45.536 24.524,45.872C24.404,46.208 24.344,46.484 24.344,46.7C24.344,47.108 24.494,47.432 24.794,47.672C25.094,47.912 25.448,48.032 25.856,48.032C26.288,48.032 26.624,47.918 26.864,47.69C27.104,47.462 27.284,47.18 27.404,46.844L29.06,42.236ZM39.968,39.5L30.032,39.5L34.964,25.64L35.036,25.64L39.968,39.5Z" style="fill-rule:nonzero;"/> <path d="M67,12.6L67,57.4C67,62.698 62.698,67 57.4,67L12.6,67C7.302,67 3,62.698 3,57.4L3,12.6C3,7.302 7.302,3 12.6,3L57.4,3C62.698,3 67,7.302 67,12.6Z" style="fill:none;stroke:black;stroke-width:6px;"/> </svg> 0xN1C0 1 Quote ☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan ☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2
Dan C Posted June 14, 2023 Posted June 14, 2023 Hi 0xN1C0, Could you try creating your own export preset with relative coordinates/viewbox disabled as below, this can then be utilised in the export persona. Lee 0xN1C0 1 Quote
0xN1C0 Posted June 14, 2023 Author Posted June 14, 2023 Thank you for your help! These export options were not available in the Export Persona Options. Did they just become available after creating my own export preset (in normal export mode) ? Works like expected now though Thank You ! Dan C 1 Quote
Dan C Posted June 14, 2023 Posted June 14, 2023 21 minutes ago, 0xN1C0 said: Thank you for your help! These export options were not available in the Export Persona Options. Did they just become available after creating my own export preset (in normal export mode) ? Works like expected now though Thank You ! yes, you need to create custom export presets in the regular export window to be able to use those additional settings in the export persona. Lee 0xN1C0 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.