A PowerPoint presentation can be secured in different ways like by applying a watermark, adding signature, or making it read only. In this step by step guide, we’ll show you how to secure PowerPoint presentation in C# .NET using a password.
The Aspose.Slides for .NET API helps you secure PowerPoint presentation using C# without the need for Microsoft Interop and does not require Microsoft PowerPoint to be installed.
Steps to Secure PowerPoint Presentation in C#
- Use Aspose.Slides for .NET NuGet package
- Add reference to Aspose.Slides and Aspose.Slides.Export namespaces
- Apply Aspose license with the help of SetLicense method
- Initiate a Presentation Class instance
- Utilize Encrypt method of ProtectionManager class to secure presentation with a password
- Finally, save password protected presentation using Save method and SaveFormat.Pptx property
Code to Secure PowerPoint Presentation in C#
In the above steps and code, you learned how to secure PPTX using C#. This API is not limited to password protection, rather you can also lock and unlock PPTX file in C# as well. This makes securing PPTX using C# a very simple and easy task with the help of Aspose.Slides for .NET.