Unlock PPTX using Java

Build Java applications that remove passwords and write protection from presentation files using server-side APIs.

Removing Protection from a PPTX Presentation via Java

Using Aspose.Slides for Java , you can remove encryption or write protection from a PPTX presentation. Use LoadOptions.setPassword to open an encrypted presentation and the ProtectionManager methods removeEncryption and removeWriteProtection to remove protection settings.

Remove Password Protection from PPTX using Java

LoadOptions loadOptions = new LoadOptions();
loadOptions.setPassword("123123");

Presentation presentation = new Presentation("presentation.pptx", loadOptions);
try {
    presentation.getProtectionManager().removeEncryption();
    presentation.save("encryption-removed.pptx", SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

Remove Write Protection from a PPTX Presentation using Java

Presentation presentation = new Presentation("presentation.pptx");
try {
    presentation.getProtectionManager().removeWriteProtection();
    presentation.save("write-protection-removed.pptx", SaveFormat.Pptx);
} finally {
    presentation.dispose();
}

How to Remove a Password from PPTX via Java

Follow these steps to remove protection from a PPTX presentation.

  1. Load the PPTX file with the Presentation class.
  2. Use LoadOptions.setPassword when the presentation is encrypted.
  3. Call removeEncryption or removeWriteProtection from the ProtectionManager object.
  4. Save the unlocked presentation with SaveFormat.Pptx.

Built with Aspose.Slides

Unlock PPTX Files Online

The free Aspose.Slides Unlock app is built with Aspose.Slides for Java, the same API as the code above. Open it and see what the API can do with your own PPTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides removes protection before you write code.
  • Remove the password or write protection from your PPTX file.
  • Download the unlocked file.

Other Supported Unlocking Formats

Using Java, you can also remove protection from the following formats.