PdfFileSecurity
Overview
PdfFileSecurity is a class in Aspose.PDF FOSS for Python.
Inherits from: _BoundFacade.
Passwords and permissions on the bound document.
This class declares 3 methods for PdfFileSecurity objects in Python programs.
Available methods include: change_password, decrypt_file, encrypt_file.
Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: permissions.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
permissions | Permissions | Read | What a reader may do with the bound document (Table 22). |
Methods
| Signature | Description |
|---|---|
encrypt_file(user_password: str, owner_password: str | None, permissions: int | Permissions, algorithm: str) → bool | Apply the standard security handler. |
decrypt_file(password: str | None) → bool | Take the protection off, given a password the document accepts. |
change_password(old_password: str, new_user_password: str, new_owner_password: str | None, permissions: int | Permissions | None, algorithm: str | None) → bool | Replace the passwords, given one that opens the document now. |