PdfPermissions enumeration

PdfPermissions enumeration

Specifies the operations that are allowed to a user on an encrypted PDF document.


DISALLOW_ALLDisallows all operations on the PDF document. This is the default value.
ALLOW_ALLAllows all operations on the PDF document.
CONTENT_COPYCopy or otherwise extract text and graphics from the document by operations other than that controlled by PdfPermissions.CONTENT_COPY_FOR_ACCESSIBILITY.
CONTENT_COPY_FOR_ACCESSIBILITYExtract text and graphics (in support of accessibility to users with disabilities or for other purposes).
MODIFY_CONTENTSModify the contents of the document by operations other than those controlled by PdfPermissions.MODIFY_ANNOTATIONS, PdfPermissions.FILL_IN, and PdfPermissions.DOCUMENT_ASSEMBLY.
MODIFY_ANNOTATIONSAdd or modify text annotations, fill in interactive form fields, and, if PdfPermissions.MODIFY_CONTENTS is also set, create or modify interactive form fields (including signature fields).
FILL_INFill in existing interactive form fields (including signature fields), even if PdfPermissions.MODIFY_CONTENTS is clear.
DOCUMENT_ASSEMBLYAssemble the document (insert, rotate, or delete pages and create document outline items or thumbnail images), even if PdfPermissions.MODIFY_CONTENTS is clear.
PRINTINGPrint the document (possibly not at the highest quality level, depending on whether PdfPermissions.HIGH_RESOLUTION_PRINTING is also set).
HIGH_RESOLUTION_PRINTINGPrint the document to a representation from which a faithful digital copy of the PDF content could be generated, based on an implementation-dependent algorithm. When this flag is clear (and PdfPermissions.PRINTING is set), printing shall be limited to a low-level representation of the appearance, possibly of degraded quality.


Shows how to set permissions on a saved PDF document.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

builder.writeln("Hello world!")

encryption_details = aw.saving.PdfEncryptionDetails("password", "", aw.saving.PdfPermissions.MODIFY_ANNOTATIONS
                                                    | aw.saving.PdfPermissions.DOCUMENT_ASSEMBLY)

# Create a "PdfSaveOptions" object that we can pass to the document's "save" method
# to modify how that method converts the document to .PDF.
save_options = aw.saving.PdfSaveOptions()

# Enable encryption via the "encryption_details" property.
save_options.encryption_details = encryption_details

# When we open this document, we will need to provide the password before accessing its contents.
doc.save(ARTIFACTS_DIR + "PdfSaveOptions.encryption_permissions.pdf", save_options)

See Also