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
| Name | Type | Access | Description |
|---|---|---|---|
can_print | bool | Read | Print the document, perhaps only at low resolution. |
can_modify | bool | Read | Change the contents, beyond annotating, filling and assembling. |
can_copy | bool | Read | Copy or extract text and graphics. |
can_annotate | bool | Read | Add or change annotations. |
can_fill_forms | bool | Read | Fill in form fields that are already there. |
can_extract_for_accessibility | bool | Read | Extract content for assistive technology. |
can_assemble | bool | Read | Insert, rotate or delete pages, and add bookmarks. |
can_print_high_resolution | bool | Read | Whether bit 12 is set: printing, where allowed, is at full fidelity. |
can_print_faithfully | bool | Read | Whether the document may be printed, and at full fidelity. |
allowed | tuple[str, ...] | Read | The names of what is allowed, in Table 22’s order. |
denied | tuple[str, ...] | Read | The names of what is not allowed, in Table 22’s order. |
is_everything | bool | Read | Whether every permission Table 22 defines is granted. |
is_nothing | bool | Read | Whether no permission Table 22 defines is granted. |
Methods
| Signature | Description |
|---|---|
all() → Permissions | Everything allowed: -4, the value an unencrypted document means. |
none() → Permissions | Nothing allowed, with the reserved bits still as Table 22 requires. |
allowing() → Permissions | Only flags allowed; everything else denied. |
denying() → Permissions | Everything allowed except flags. |
of(value: Any) → Permissions | value as a :class:Permissions, whatever kind of number it is. |
with_() → Permissions | This, plus flags. |
without() → Permissions | This, minus flags. |
allows() → bool | Whether every one of flags is allowed. |
to_dict() → dict[str, bool] | Every permission and whether it is granted. |
__repr__() → str | Calls repr on this Permissions instance. |