Hello Team,
I have used your below provided link to add .svg images to .pptx
https://docs.aspose.com/display/slidesnet/Adding+Shapes#AddingShapes-AddSVGIntoSlide
Find below my code:
using (Presentation presentation = new Presentation())
{
var svgContent = System.IO.File.ReadAllText(outputPath + “SVG.svg”);
var emfImage = presentation.Images.AddFromSvg(svgContent);
presentation.Slides[0].Shapes.AddPictureFrame(ShapeType.Rectangle, 0, 0, emfImage.Width, emfImage.Height, emfImage);
presentation.Save(outputPath + “SVG.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);
}
Also find SVG.svg image used in it attached with this ticket in SVG.zip.SVG.zip (135.5 KB)
This code is generating blank .pptx file.
On exploring emfImage further, I found that its throwing below errors on SystemImage:
- Palette = ‘((Aspose.Slides.PPImage)emfImage).SystemImage.Palette’ threw an exception of type ‘System.Runtime.InteropServices.ExternalException’
- PropertyItems = ‘((Aspose.Slides.PPImage)emfImage).SystemImage.PropertyItems’ threw an exception of type ‘System.NotImplementedException’
Kindly provide a solution for the same.