asposeaspose-slides

Aspose slide include svg into ppt slide


Does Aspose slide include svg into ppt slide? Is there way using slide api to do this? Any snippet would be good for reference.


Solution

  • I suggest you to please try using following sample code on your end using latest Aspose.slides for .NET 17.12.

    string dataDir = RunExamples.GetDataDir_PresentationProperties();
    using (var pres = new Presentation())
    {
        var svgContent = File.ReadAllText(svgPath);
        var emfImage = p.Images.AddFromSvg(svgContent);
        pres.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, emfImage.Width, emfImage.Height, emfImage);
        pres.Save(outPptxPath, SaveFormat.Pptx);
    }