PPT
PPTX
ODP
POT
ppsx
PPTX
Lock or Password Protect PPTX using Java
Build your own Java apps to protect presentation files using server-side APIs.
Protecting a PPTX Presentation via Java
Using Aspose.Slides for Java, you can protect your PPTX presentation from opening or modification by setting a password. Then, to open or modify the locked presentation, a user has to provide the password.
Encrypting a PPTX Presentation using Java
Presentation presentation = new Presentation("pres.pptx");
try {
presentation.getProtectionManager().encrypt("123123");
presentation.save("encrypted-pres.pptx", SaveFormat.Pptx);
} finally {
if (presentation != null) presentation.dispose();
}
Setting Write Protection to a PPTX Presentation using Java
Presentation presentation = new Presentation("pres.pptx");
try {
presentation.getProtectionManager().setWriteProtection("123123");
presentation.save("write-protected-pres.pptx", SaveFormat.Pptx);
} finally {
if (presentation != null) presentation.dispose();
}
How to Password Protect PPTX via Java
These are the steps to Protect PPTX files.
Load PPTX with an instance of Presentation
Protect the presentation using ProtectionManager class
Save result in PPTX format