Hi,
I am using Aspose.Words and I am making use of inserting several svg images into the word documents. I found an issue, wher AW is adding some whitespace between two SVG tags, where Word itself and browsers behave differently.
Here is a zipped SVG that can be used to reproduce the issue: repro.zip (502 Bytes)
If you open this in Chrome, it displays as I expect, there is no whitespace between “T” and “Soll”, which are contained in two separate but contigous tspan elements. If you add a line break before the tspan containing “Soll”, the browser will add a single whitespace character between “T” and “Soll” but still keeping the text on a single line.
If you drop both of the described versions into Word (drag&drop the svg file from file explorer), Word does not add the whitespace character the browser is adding.
I am fine with what the browsers are doing and since I don’t want to have that additional whitespace rendered between the two tspan elements, the whole text incl. all tspan elements is a single line. So the browser renders as I expect, Word does as well (though it doesn’t seem to care much about the difference as it is rendering both versions the same way), but AW adds that additional whitespace where it shouldn’t (compared to results in browser and Word).
At first I was thinking to change my svg generating code, but since browsers and Word behave consistently in not adding the whitespace when tspans are on a single line, I decided to open an issue and let you know. I am also fine with a “workaround” solution that works across brosers/Word/AW, if you have some suggestion.
Thanks,
Florian