Protect ODP Presentations with Python
Build Python applications that encrypt presentations or set write protection with Aspose.Slides.
Protect an ODP Presentation with Python
Aspose.Slides for Python via .NET
provides two distinct protection mechanisms. Call ProtectionManager.encrypt to encrypt an ODP presentation and require a password to open it. Alternatively, call ProtectionManager.set_write_protection to discourage modification without encrypting the file. A user can still open a write-protected presentation and save changes to a different file.
Encrypt an ODP Presentation - Python
with slides.Presentation("presentation.odp") as presentation:
presentation.protection_manager.encrypt("123123")
presentation.save("encrypted-presentation.odp", slides.export.SaveFormat.ODP)Set Write Protection on an ODP Presentation - Python
with slides.Presentation("presentation.odp") as presentation:
presentation.protection_manager.set_write_protection("123123")
presentation.save("write-protected-presentation.odp", slides.export.SaveFormat.ODP)How to Protect ODP with Python
Follow these steps to protect an ODP file.
- Open the ODP file with
Presentation. - Use
ProtectionManager.encryptto require a password for opening, or useProtectionManager.set_write_protectionto discourage changes. - Save the protected presentation as ODP with
SaveFormat.ODP.
Built with Aspose.Slides
Password-Protect ODP Files Online
The free Aspose.Slides Lock app is built with Aspose.Slides for Python via .NET, the same API as the code above. Open it and see what the API can do with your own ODP files.
- Runs in your browser, nothing to install.
- See how Aspose.Slides protects presentations before you write code.
- Set a password to open or edit your ODP file.
- Download the protected file.
Other Supported Protection Formats
Use Python to protect other supported presentation formats.