PPT PPTX ODP POT ppsx
Aspose.Slides  for Java
ODP

Lock or Password Protect ODP using Java

Build your own Java apps to protect presentation files using server-side APIs.

Protecting a ODP Presentation via Java

Using Aspose.Slides for Java, you can protect your ODP 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 ODP Presentation using Java


Presentation presentation = new Presentation("pres.odp");
try {
    presentation.getProtectionManager().encrypt("123123");
    presentation.save("encrypted-pres.odp", SaveFormat.Odp);
} finally {
    if (presentation != null) presentation.dispose();
}

Setting Write Protection to a ODP Presentation using Java


Presentation presentation = new Presentation("pres.odp");
try {
    presentation.getProtectionManager().setWriteProtection("123123");
    presentation.save("write-protected-pres.odp", SaveFormat.Odp);
} finally {
    if (presentation != null) presentation.dispose();
}

How to Password Protect ODP via Java

These are the steps to Protect ODP files.

  1. Load ODP with an instance of Presentation

  2. Protect the presentation using ProtectionManager class

  3. Save result in ODP format

Other Supported Protect Formats

Using Java, You can also protect the following formats: