Attributes of Text Elements don't seem to work

Hello,

I’ve noticed that in elements the textLength Attribute doesn’t seem to work when converting an SVG file into an image. I’ve then tested the svg-text-arranging.svg file from this article and noticed that the resulting image looks completely different than expected, with all the text appearing with the same width and with the same content, as if no Attribute except “x”, “y” and the “fill” is being applied to the text:

asposeSVG_Text_Example.png (50.3 KB)

I’ve used both Converter.ConvertSVG and SVGDocument.RenderTo() with an ImageDevice to convert this example SVG into a PNG file. As it looks like these Attributes are supported by Aspose.SVG I’m unsure if I did something wrong or if it’s a bug.

@Developer123123

It seems you’re experiencing issues with the textLength attribute in <text> elements when converting an SVG file to an image using Aspose.SVG. The resulting image appears to have all text rendered with the same width and content, which indicates that the attributes may not be applied correctly during the conversion process.

Here are a few troubleshooting steps you can take:

  1. Check SVG Compatibility: Ensure that the SVG file you are using is compatible with the Aspose.SVG library. Some SVG features may not be fully supported.

  2. Update Aspose.SVG: Make sure you are using the latest version of the Aspose.SVG library, as updates may include bug fixes and improved support for SVG features.

  3. Use Different Rendering Methods: Since you have already tried both Converter.ConvertSVG and SVGDocument.RenderTo(), consider experimenting with different ImageDevice settings or parameters to see if that affects the rendering of text attributes.

  4. Test with Simplified SVG: Create a simplified version of your SVG file with just the text elements and the textLength attribute to isolate the issue. This can help determine if the problem lies within the specific SVG file or the library’s handling of it.

  5. Consult Documentation and Forums: Review the Aspose.SVG documentation for any notes on text rendering and attributes. You can also check the Aspose forums for similar issues or post your question there for community support.

If the problem persists, it may be worth reporting it as a potential bug to the Aspose support team, providing them with the SVG file and details of your findings.

I’m already using Aspose.SVG 25.9.0. I haven’t found any ImageDevice Setting that fixes my issue and the sample file I’ve referenced above is already basic enough I think.
I’m not sure where I can check if the Attributes are compatible with this library, but rotate and textLength are referenced in the docs so I thought they would be supported.

@Developer123123

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SVGNET-531

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.