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.

Thu Jun 01, 2023 11:43 am

Is there a way to programmatically check if a PowerPoint generated via spire will be corrupt when opened?

Sometimes a developer makes a mistake and introduces a bug in the pptx, this corrupts the PowerPoint, but you only find out when you open the pptx.

When you open it you get this message:

PowerPoint found a problem with content in C:\....\pptxname.pptx.
PowerPoint can attempt to repair the presentation.

If you trust the source of this presentation, click Repair.
Repair, Cancel.


Is there a way to check via code if the PowerPoint is corrupt or not.

boosted_d16
 
Posts: 34
Joined: Wed Apr 19, 2023 11:41 am

Fri Jun 02, 2023 6:10 am

Hi,

Thank you for your inquiry regarding the possibility of using our Spire.Presentation to check whether the PPT files generated by your team are corrupted or not. Unfortunately, our product does not currently have this feature.

However, you can use our Spire.Presentation to load the saved document. If the format is correct, there will be no exceptions thrown. You can then check whether the document is incorrect in the catch block.

We hope this information helps. Please let us know if you have any further questions or concerns.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Presentation

cron