SVG to Image - Element Position Issue


The Imaging library is not respecting the positioning of all elements within an SVG. Attached shows the problem area, displays fine within a browser but the Imaging library fails to render appropriately.


Hi Kevin,

Thanks for inquiring Aspose.Imaging.

I have observed the information shared by you. Can you please share the used sample code and generated output file with us. I also request you to please try using Aspose.Imaging for .NET 17.4 on your end as well before sharing further information with us.

Many Thanks,


I am currently using version 17.4, here is the code I use to convert the svg to png.

string svgContent;

using (FileStream fs = new FileStream(@“C:\Itst\temp\SvgData.txt”, FileMode.Open, FileAccess.Read))


using (StreamReader sr = new StreamReader(fs))


sr.BaseStream.Seek(0, SeekOrigin.Begin);

svgContent = sr.ReadToEnd();



byte[] data = Encoding.ASCII.GetBytes(svgContent);

using (MemoryStream writer = new MemoryStream())


writer.Write(data, 0, data.Length);

using (Aspose.Imaging.FileFormats.Svg.SvgImage svgImage = (Aspose.Imaging.FileFormats.Svg.SvgImage)Aspose.Imaging.Image.Load(writer))


svgImage.Save(@“C:\Itst\temp\svg.png”, new Aspose.Imaging.ImageOptions.PngOptions());



Hi Kevin,

I have worked with file shared by you and have been able to observe the issue. An issue with ID IMAGINGNET-2380 has been logged into our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,


The issues you have found earlier (filed as IMAGINGNET-2380) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz


The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.