HTML JPG PDF XML ODP
Unlock ODP Presentation in C#
Remove protection from ODP using .NET library.
Unlock ODP File Using C#
In order to remove protection ODP file, we’ll use
API which is a feature-rich, powerful and easy to use document protection API for C# platform. Open
package manager, search for Aspose.Slides and install. You may also use the following command from the Package Manager Console.
PM> Install-Package Aspose.Slides.NET
Unlock ODP via C#
You need aspose.slides.dll referenced in your project to execute the following workflow.
Load locked ODP with an instance of Presentation
Check protection using IProtectionManager.IsWriteProtected boolean type property
Remove protection using the IProtectionManager.RemoveWriteProtection method
Save result in ODP format
Aspose.Slides for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with .NET Framework, .NET Core, Windows Azure, Mono or Xamarin Platforms
- Development environment like Microsoft Visual Studio
- Aspose.Slides for .NET referenced in your project
// load locked ODP file var presentation = new Slides.Presentation("locked.odp"); // check if presentation is write protected if (presentation.ProtectionManager.IsWriteProtected) // remove protection presentation.ProtectionManager.RemoveWriteProtection(); // save presentation presentation.Save("output.ppt", Aspose.Slides.Export.SaveFormat.Odp);