I’m trying to convert a PPTX to PDF with embedded charts but I am getting a NullReference exception. My code is as follows:
WriteLogMessage($"{convDoc.FileExtension} Conversion.", log, Enumerations.LogLevel.Information);
Aspose.Slides.License slidesLic = new Aspose.Slides.License();
slidesLic.SetLicense("Aspose.Total.lic");
WriteLogMessage("Creating in memory Aspose document from the memory stream.", log, Enumerations.LogLevel.Information);
Presentation presentation = new Presentation(inMemStrm);
WriteLogMessage("Saving Aspose document as PDF to output memory stream.", log, Enumerations.LogLevel.Information);
Aspose.Slides.Export.PdfOptions slideSaveOptions = new Aspose.Slides.Export.PdfOptions();
slideSaveOptions.SaveMetafilesAsPng = true;
slideSaveOptions.JpegQuality = (byte)100;
slideSaveOptions.TextCompression = Aspose.Slides.Export.PdfTextCompression.Flate;
slideSaveOptions.SufficientResolution = 300;
slideSaveOptions.Compliance = Aspose.Slides.Export.PdfCompliance.PdfA1b;
presentation.Save(outMemStrm, Aspose.Slides.Export.SaveFormat.Pdf, slideSaveOptions);
If I remove the charts from the source file they convert without issue.