Adding SVG to ppt is throwing error on Ubuntu

Hi.

I’m getting an error when inserting svg into ppt on Ubuntu using .Net Core.

using (Presentation presentation = new Presentation())
{
var svgContent = System.IO.File.ReadAllText("/root/test.svg");

           ISvgImage svgImage = new SvgImage(svgContent);
           var emfImage = presentation.Images.AddImage(svgImage);
           presentation.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, emfImage.Width, emfImage.Height, emfImage);
            presentation.Save("test.pdf", Aspose.Slides.Export.SaveFormat.Pdf);
        }

The error is attached as an image. The same code works fine in Windows.

Unhandled Exception: System.ArgumentException: Parameter is not valid.
at System.Drawing.Image.CreateFromHandle(IntPtr handle)
at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
at Aspose.Slides.PPImage.()
at Aspose.Slides.PPImage.get_Width()

image.png (5.4 KB)

@ashiramin,

Can you please share source presentation so that we may further investigate to help you out. Also please share environment details with us.

@Adnan.Ahmad

I’m running this on Ubuntu 18.04 with .net core 2.1 and latest version of aspose slides. As for the presentation I initialize a new presentation object.

Let me know if you have additional questions.

Thanks

@ashiramin,

Can you please share source svg image along with which Aspose.Slides version you are using on your end.

I used 19.7 Aspose slides. Attaching the sample svg file. Though I’ve tried it with random svg images found online and got the same error.

test.svg.zip (2.2 KB)

@ashiramin,

I have worked with source file and have been able to observe issue. A ticket with ID SLIDESNET-41367 has been created in our issue tracking system to further investigate to resolve the issue. We will share good news with you soon.

When can I expect it to be resolved?

@ashiramin,

I like to inform that we will share ETA after detail investigation. I request for your patience.

The issues you have found earlier (filed as SLIDESNET-41367) have been fixed in this update.