PPT PPTX ODP POT ppsx
Aspose.Slides for Python via .NET
PPTX

Unlock PPTX using Python

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

Remove Encryption from a PPTX Presentation with Python

Aspose.Slides for Python via .NET can remove encryption or write protection from a PPTX presentation. After you load an encrypted file with the correct password, call remove_encryption() to save an unencrypted copy.

Remove Password Encryption from PPTX with Python

load_options = slides.LoadOptions()
load_options.password = "123123"

with slides.Presentation("encrypted-presentation.pptx", load_options) as presentation:
    presentation.protection_manager.remove_encryption()
    presentation.save("unencrypted-presentation.pptx", slides.export.SaveFormat.PPTX)

Remove Write Protection from a PPTX Presentation with Python

with slides.Presentation("write-protected-presentation.pptx") as presentation:
    presentation.protection_manager.remove_write_protection()
    presentation.save("unprotected-presentation.pptx", slides.export.SaveFormat.PPTX)

How to Remove a Password from PPTX with Python

These are the steps to remove protection from PPTX files.

  1. Set the password through LoadOptions.password, and load the PPTX file into a Presentation instance.

  2. Call ProtectionManager.remove_encryption() to remove encryption. For write-protected files, call ProtectionManager.remove_write_protection() instead.

  3. Call Presentation.save() with SaveFormat.PPTX to save the unlocked presentation.

Other Supported Formats

You can also use Python to remove protection from the following formats: