We’re assessing whether Slides would be suitable for converting PowerPoint to SVG. An issue we’re running into is the quality of hyperlinks.
We are using the code from https://docs.aspose.com/display/slidesjava/Rendering+a+Slide#RenderingaSlide-GeneratinganSVGImagefromaSlide
What we’re seeing is the following:
Text tspans are getting a textLength attribute:
<xlink:href="#category-472"><tspan x=“9.375” y=“21.96484” textLength=“69.625” font-family=“Verdana” fill="#FFFFFF">Case studies</tspan></a>
The underline for the hyperlink is being created as a separate path:
<path fill="#FFFFFF" d=“M11 41.76L11 41.76 154.75 41.76 154.75 42.76 11 42.76z”></path>
If the SVG is embedded in a page and scaled, this leads to poorly laid out text and often the underline not matching up to the text.
What would be ideal would be if the following could happen:
- Add an option to com.aspose.slides.SVGOptions to control whether the textLength is added to text
- Add an option to com.aspose.slides.SVGOptions to control whether an underline is drawn (as per the current behaviour) or if a CSS class is used. If the CSS class is used, then add a class onto the text/tspan element:
<xlink:href="#category-472"><tspan x=“9.375” y=“21.96484” class=“aspose_underline” font-family=“Verdana” fill="#FFFFFF">Case studies</tspan></a>
- Add a style element into the SVG with the following:
The benefits of using classing is that the SVG would become smaller, the underlines would be more accurate and the end user could apply their own style overrides if need be. BTW - this would also be a really useful option in Diagram vsdx->svg.