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.
Unfortunately, activation email could not send to your email. Please try again.

NullReferenceException while converting PPTX

Thread ID:

Created:

Updated:

Platform:

Replies:

127451 Nov 16,2016 08:47 AM Nov 16,2016 11:38 PM ASP.NET Web Forms 1
loading
Tags: Presentation
Sergey Zubkov
Asked On November 16, 2016 08:47 AM

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

Devisri Jothi [Syncfusion]
Replied On November 16, 2016 11:38 PM

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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;