We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

NullReferenceException while converting PPTX

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

1 Reply

DJ Devisri Jothi Syncfusion Team November 17, 2016 04:38 AM UTC

Hi Sergey,

Thank you for contacting Syncfusion support.

A support incident to track the status of your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions. 
Regards, 
Devisri 


Loader.
Up arrow icon