Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Sat Sep 10, 2016 10:49 pm

I'm using the Spire.Presentation package (version 2.6.23.11040) to open a PowerPoint in an ASP.NET MVC 5 project and am running into an exception that states the file I'm trying to open is corrupt when opening via Presentation.LoadFromFile(). The exact message is "Microsoft PowerPoint 2007 file is corrpt.". I'm able to open the PowerPoint normally through PowerPoint 2016 so am not sure what the issue is. This code is also able to open about 50% of the PowerPoints I'm using without an issue but I can't figure out any significant differences between the files that open and those that don't.

Here's the relevant code:

Code: Select all
if (extension.Equals(".ppt") || extension.Equals(".pptx"))
{
    Spire.Presentation.Presentation presentation = new Spire.Presentation.Presentation();

    presentation.LoadFromFile(filePath); // this throws the exception
}


Is this a bug or is there an issue with my files? I can include some more information as well if the above is not sufficient.

asbolton
 
Posts: 1
Joined: Sat Sep 10, 2016 10:46 pm

Mon Sep 12, 2016 8:14 am

Hi,

Thanks for your inquiry. Could you please provide your document for looking into the issue ?

Thanks,
Alan
E-iceblue support team
User avatar

Alan.Li
 
Posts: 35
Joined: Mon Sep 05, 2016 2:51 am

Return to Spire.Presentation