PPT
PPTX
ODP
POT
PPSX
ODP
Lock or Password Protect ODP using Java
Build Java applications that protect presentation files using server-side APIs.
Protecting an ODP Presentation via Java
Using
Aspose.Slides for Java
, you can protect an ODP presentation from opening or modification by setting a password. Use the ProtectionManager object from the Presentation class to call methods such as encrypt and setWriteProtection.
Encrypt an ODP Presentation using Java
Presentation presentation = new Presentation("presentation.odp");
try {
presentation.getProtectionManager().encrypt("123123");
presentation.save("encrypted-presentation.odp", SaveFormat.Odp);
} finally {
presentation.dispose();
}
Set Write Protection for an ODP Presentation using Java
Presentation presentation = new Presentation("presentation.odp");
try {
presentation.getProtectionManager().setWriteProtection("123123");
presentation.save("write-protected-presentation.odp", SaveFormat.Odp);
} finally {
presentation.dispose();
}
How to Password Protect ODP via Java
These are the steps to protect ODP files.
Load the
ODPfile with thePresentationclass.Call the
encryptmethod or thesetWriteProtectionmethod from theProtectionManagerobject.Save the protected presentation in ODP format.