PPT
PPTX
ODP
POT
PPSX
PPT
Lock or Password Protect PPT using Java
Build Java applications that protect presentation files using server-side APIs.
Protecting a PPT Presentation via Java
Using
Aspose.Slides for Java
, you can protect a PPT 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 a PPT Presentation using Java
Presentation presentation = new Presentation("presentation.ppt");
try {
presentation.getProtectionManager().encrypt("123123");
presentation.save("encrypted-presentation.ppt", SaveFormat.Ppt);
} finally {
presentation.dispose();
}
Set Write Protection for a PPT Presentation using Java
Presentation presentation = new Presentation("presentation.ppt");
try {
presentation.getProtectionManager().setWriteProtection("123123");
presentation.save("write-protected-presentation.ppt", SaveFormat.Ppt);
} finally {
presentation.dispose();
}
How to Password Protect PPT via Java
These are the steps to protect PPT files.
Load the
PPTfile with thePresentationclass.Call the
encryptmethod or thesetWriteProtectionmethod from theProtectionManagerobject.Save the protected presentation in PPT format.