PdfFileSecurity

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

NameTypeAccessDescription
permissionsPermissionsReadWhat a reader may do with the bound document (Table 22).

Methods

SignatureDescription
encrypt_file(user_password: str, owner_password: str | None, permissions: int | Permissions, algorithm: str) → boolApply the standard security handler.
decrypt_file(password: str | None) → boolTake 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) → boolReplace the passwords, given one that opens the document now.

See Also