Permissions

Overview

Permissions is a class in Aspose.PDF FOSS for Python. Inherits from: int.

What a reader may do with an encrypted document: /P, with names.

This class declares 10 methods for Permissions objects in Python programs. Available methods include: __repr__, all, allowing, allows, denying, none, of, to_dict, with_, without. Public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: allowed, can_annotate, can_assemble, can_copy, can_extract_for_accessibility, can_fill_forms, and 7 more.

Properties

NameTypeAccessDescription
can_printboolReadPrint the document, perhaps only at low resolution.
can_modifyboolReadChange the contents, beyond annotating, filling and assembling.
can_copyboolReadCopy or extract text and graphics.
can_annotateboolReadAdd or change annotations.
can_fill_formsboolReadFill in form fields that are already there.
can_extract_for_accessibilityboolReadExtract content for assistive technology.
can_assembleboolReadInsert, rotate or delete pages, and add bookmarks.
can_print_high_resolutionboolReadWhether bit 12 is set: printing, where allowed, is at full fidelity.
can_print_faithfullyboolReadWhether the document may be printed, and at full fidelity.
allowedtuple[str, ...]ReadThe names of what is allowed, in Table 22’s order.
deniedtuple[str, ...]ReadThe names of what is not allowed, in Table 22’s order.
is_everythingboolReadWhether every permission Table 22 defines is granted.
is_nothingboolReadWhether no permission Table 22 defines is granted.

Methods

SignatureDescription
all() → PermissionsEverything allowed: -4, the value an unencrypted document means.
none() → PermissionsNothing allowed, with the reserved bits still as Table 22 requires.
allowing() → PermissionsOnly flags allowed; everything else denied.
denying() → PermissionsEverything allowed except flags.
of(value: Any) → Permissionsvalue as a :class:Permissions, whatever kind of number it is.
with_() → PermissionsThis, plus flags.
without() → PermissionsThis, minus flags.
allows() → boolWhether every one of flags is allowed.
to_dict() → dict[str, bool]Every permission and whether it is granted.
__repr__() → strCalls repr on this Permissions instance.

See Also