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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PresentationCore Out of Memory exception loading a ppt

Thread ID:

Created:

Updated:

Platform:

Replies:

125113 Jul 22,2016 06:50 AM UTC Jul 26,2016 10:16 AM UTC ASP.NET MVC 1
loading
Tags: Presentation
Juan Acosta
Asked On July 22, 2016 06:50 AM UTC

Hi,

I was following the tutorial here. 

http://mvc.syncfusion.com/demos/web/presentation/pptxtopdf

After fixing some issues with the webformats mvc5 nugget. 

I finished with some code like this

public void ConvertPPTToPDFWordPreview(string pptDocument, string pptDocumentName)
        {
            IPresentation presentation = Presentation.Open(MvcApplication.GetDocumentsDirectory() + "\\" + HttpUtility.UrlDecode(pptDocument));
            presentation.ChartToImageConverter = new ChartToImageConverter();
            presentation.ChartToImageConverter.ScalingMode = Syncfusion.OfficeChart.ScalingMode.Best;

            PresentationToPdfConverterSettings settings = new PresentationToPdfConverterSettings();
            settings.ShowHiddenSlides = true;

            //Instance to create pdf document from presentation                
            PdfDocument doc = PresentationToPdfConverter.Convert(presentation, settings);

            //Saves the pdf document
            doc.Save(MvcApplication.GetCacheDirectory() + "\\" + HttpUtility.UrlDecode(pptDocumentName + ".pdf"));
        }

I have the issue when I try to convert a really small ppt to pdf.

The exception detail is this:

System.OutOfMemoryException was unhandled
Message: An unhandled exception of type 'System.OutOfMemoryException' occurred in PresentationCore.dll
Additional information: Insufficient memory to continue the execution of the program.


I have to make a dispose in any point? Are the ppt not supported and only the pptx supported?

If anyone knows why this could be happening, please let me know.

Kind regards, 

Juan




Attachment: crashpresentation_d4fdb9b3.zip

Devisri Jothi [Syncfusion]
Replied On July 26, 2016 10:16 AM UTC

Hi Juan, 
Thank you for using Syncfusion product. 
We have checked the provided screenshot that shows No Symbols Loaded warning for “PresentationCore.dll” which is a .NET Framework built-in assembly and not related to Syncfusion product. Please refer the below MSDN link to resolve this issue. 
Is the ppt not supported and only the pptx supported? 
Yes, at the moment Support for PPT file format is not available in Presentation library. We have already logged this as a feature request in our database. We will implement this feature in any of our upcoming releases. We usually have an interval of at least three months between releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented. This can be tracked through our feature management system: 
Work Around for PPT file format 
You can use B2X translator to convert Microsoft Office binary file format(.PPT) to Office Open XML standard format(.PPTX). This translator is an open source project that can be used as a work around for Office binary formats interoperability. 
Sample 
The sample demonstrates how a PPTX file can be converted to PDF document using Presentation library. The PDF gets generated in the Output folder of the sample. 
Please refer the following online UG documentation to know more about supported features: 
Please let me know if you have any question. 
Thanks, 
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.

Warning Icon 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.Close Icon

;