Hello.
I'm getting a 'NullReferenceException' after trying to convert .pptx file like this:
using (var presentation = Presentation.Open(sourcePath))
{
presentation.ChartToImageConverter = new ChartToImageConverter();
presentation.ChartToImageConverter.ScalingMode = ScalingMode.Best;
PresentationToPdfConverterSettings settings = new PresentationToPdfConverterSettings();
using (var pdfDoc = PresentationToPdfConverter.Convert(presentation, settings))
{
pdfDoc.EnableMemoryOptimization = false;
pdfDoc.Save(dstPath);
pdfDoc.Close();
}
presentation.Close();
}
Stack trace:
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.Presentation.TableImplementation.Cell.GetBorderLine(BorderType borderType)
at Syncfusion.Presentation.Rendering.GDIRenderer.DrawCell(IShape shape, ICell cell)
at Syncfusion.Presentation.Rendering.GDIRenderer.DrawTable(Table table, IShape shape)
at Syncfusion.Presentation.Rendering.GDIRenderer.DrawShape(Shape shapeImpl, RectangleF bounds)
at Syncfusion.Presentation.Rendering.GDIRenderer.DrawShape(Shape shapeImpl)
at Syncfusion.Presentation.Rendering.GDIRenderer.DrawSlide(Slide slide)
at Syncfusion.Presentation.SlideImplementation.Slide.ConvertToImage(ImageFormat imageFormat)
at Syncfusion.PresentationToPdfConverter.PresentationToPdfConverter.DrawSlide(PdfDocument pdfDocument, ISlide slide)
at Syncfusion.PresentationToPdfConverter.PresentationToPdfConverter.Convert(IPresentation presentation, PresentationToPdfConverterSettings settings)
Attachment:
doc_488cbcab.zip