Hi,
I am trying to add/convert my pdf report to pptx using Aspose.Slides.Net library.
But if my report contains a charts, the presentation is not being created correctly.
When I open the PowerPoint file I see error message
image.png (4.8 KB)
I tried to repair the presentation file, but the charts are not in report anymore and it shows some blank slides
Here is my code
var licenseSlides = new Aspose.Slides.License();
licenseSlides.SetLicense("Aspose.Slides.NET.lic");
var fileName = "test";
fileName = "C:\\Download\\pptx\\" + fileName;
var pdfBytes = File.ReadAllBytes(fileName + ".pdf");
using (Aspose.Slides.Presentation pres = new Aspose.Slides.Presentation())
using (Stream stream = new MemoryStream(pdfBytes))
{
pres.SlideSize.Orientation = Aspose.Slides.SlideOrientation.Landscape;
pres.Slides.AddFromPdf(stream);
if (pres.Slides.Count > 1)
{
pres.Slides.RemoveAt(0);
}
pres.Save(fileName + ".pptx", Aspose.Slides.Export.SaveFormat.Pptx);
}