Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

Example for a bad svg export

0 votes

I got the same problem with SVG export (which I rely on for vector-based PDF export). Some (not all!) of my own SVG icons are scaled down to ~90% and have a bounding-box of ~30%, when I open the svg with Inkscape.

Examples see here:

yEd file

SVG file

Is there any work-around for this strange behaviour?

Best regards, Jörg

related to an answer for: Export destroys vector-icons
in Help by

1 Answer

0 votes

How an SVG document is displayed always depends on the SVG viewer application used. (That is simply how SVG works.) Out of five SVG viewer applications that I tested, three (yEd, Chrome, Firefox) displayed your sample SVG document one way and two (Emacs, Inkscape) displayed the document another way. Hazarding a wild guess, I think the fact that the left-hand-side SVG document uses millimeter units and declares an explicit viewbox while the right-hand-side SVG document uses user space units and declares no viewbox leads to problems. Unfortunately, I know way too little SVG to decide which viewer is right. (Actually, I think even an SVG expert would be hard pressed to decide which visualization is correct due to the many transformations used inside your original SVG documents.)



See also SVG export bug? some custom symbols change their size when export is opened in Inkscape.

by [yWorks] (161k points)
edited by
Workaround: Convert the SVG properties into the right scheme.

To convert a faulty SVG icon, open it in Inkscape, save as PDF, open in Inkscape, save as SVG. Now change the SVG path in yEd to the new file (Properties / SVG / SVG).

Now the SVG icon will export correctly in yEd.
Legal Disclosure | Privacy Policy
...