adobe.pdfservices.operation.pdfjobs.params.protect_pdf package
Submodules
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.content_encryption module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.content_encryption.ContentEncryption(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Supported types of content to encrypt for
ProtectPDFJob
- ALL_CONTENT = 'ALL_CONTENT'
Encrypts all the content of the PDF file
- ALL_CONTENT_EXCEPT_METADATA = 'ALL_CONTENT_EXCEPT_METADATA'
Encrypts all the content except the metadata of the PDF file
- ONLY_EMBEDDED_FILES = 'ONLY_EMBEDDED_FILES'
Encrypts only embedded files
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.encryption_algorithm module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.encryption_algorithm.EncryptionAlgorithm(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Supported encryption algorithms for
ProtectPDFJob
- AES_128 = 'AES_128'
Represents AES-128 encryption algorithm
- AES_256 = 'AES_256'
Represents AES-256 encryption algorithm
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.password_protect_params module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.password_protect_params.PasswordProtectParams(encryption_algorithm: EncryptionAlgorithm, *, content_encryption: ContentEncryption = ContentEncryption.ALL_CONTENT, permissions: Permissions | None = None, user_password: str | None = None, owner_password: str | None = None)
Bases:
ProtectPDFParams
Parameters for securing PDF file with passwords and document permissions using
ProtectPDFJob
Constructs a new
PasswordProtectParams
instance.- Parameters:
encryption_algorithm (EncryptionAlgorithm) – Sets the intended encryption algorithm required for encrypting the PDF file. For AES-128 encryption, the password supports LATIN-I characters only. For AES-256 encryption, passwords supports Unicode character set.
content_encryption (ContentEncryption) – Type of content to encrypt in the PDF file. (Optional, use key-value)
permissions (Permissions) – Sets the intended permissions for the encrypted PDF file. This includes permissions to allow printing, editing and content copying in the PDF document. Permissions can only be used in case the owner password is set. (Optional, use key-value)
user_password (str) – User password required for opening the encrypted PDF file. Allowed maximum length for the user password is 128 bytes. (Optional, use key-value)
owner_password (str) – Owner password required to control access permissions in the encrypted PDF file. This password can also be used to open/view the encrypted PDF file. Allowed maximum length for the owner password is 128 bytes. (Optional, use key-value)
- get_content_encryption()
- Returns:
ContentEncryption for the resulting encrypted PDF file as a string.
- Return type:
- get_encryption_algorithm()
- Returns:
EncryptionAlgorithm of the resulting encrypted PDF file.
- Return type:
- get_owner_password()
- Returns:
the intended owner password of the resulting encrypted PDF file.
- Return type:
str
- get_permissions()
- Returns:
Permissions for the resulting encrypted PDF file.
- Return type:
- get_user_password()
- Returns:
the intended user password of the resulting encrypted PDF file.
- Return type:
str
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.permission module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.permission.Permission(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Document Permissions for
ProtectPDFJob
- COPY_CONTENT = 'COPY_CONTENT'
Enables copying of content from the PDF document
- EDIT_ANNOTATIONS = 'EDIT_ANNOTATIONS'
Enables additions of comments, digital signatures and filling in of forms in a PDF document
- EDIT_CONTENT = 'EDIT_CONTENT'
Enables all the editing permissions in the PDF document except commenting and page extraction
- EDIT_DOCUMENT_ASSEMBLY = 'EDIT_DOCUMENT_ASSEMBLY'
Enables insertion, deletion and rotation of pages in a PDF document
- EDIT_FILL_AND_SIGN_FORM_FIELDS = 'EDIT_FILL_AND_SIGN_FORM_FIELDS'
Enables filling in of forms, digital signature and creation of template pages in a PDF document
- PRINT_HIGH_QUALITY = 'PRINT_HIGH_QUALITY'
Enables high quality printing of the PDF document
- PRINT_LOW_QUALITY = 'PRINT_LOW_QUALITY'
Enables low quality printing of the PDF document
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.permissions module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.permissions.Permissions
Bases:
object
Document Permissions for
ProtectPDFJob
Constructs a new
Permissions
instance.- add_permission(permission: Permission)
Adds a document
Permission
in the permissions set.- Parameters:
permission (Permission) – A document permission; can not be None.
- get_values()
- Returns:
the intended set of document permissions values.
- Return type:
list
adobe.pdfservices.operation.pdfjobs.params.protect_pdf.protect_pdf_params module
- class adobe.pdfservices.operation.pdfjobs.params.protect_pdf.protect_pdf_params.ProtectPDFParams
Bases:
PDFServicesJobParams
,ABC
Marker base class for
ProtectPDFJob
params.