DocumentPrivilege
Overview
DocumentPrivilege is a class in Aspose.Pdf FOSS for Java.
Inherits from: Comparable<Object>.
Represents the access privileges (permissions) for a PDF document (ISO 32000-1:2008, Table 22).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
allowAll | DocumentPrivilege | Read | Returns a privilege set that allows all operations. |
forbidAll | DocumentPrivilege | Read | Returns a privilege set that forbids all operations. |
value | int | Read | Returns the permission bitmask value. |
allowPrint | boolean | Read | Returns whether printing is allowed. |
allowModifyContents | boolean | Read | Returns whether content modification is allowed. |
allowCopy | boolean | Read | Returns whether copying content is allowed. |
allowModifyAnnotations | boolean | Read | Returns whether modifying annotations is allowed. |
allowFillIn | boolean | Read | Returns whether filling in forms is allowed. |
allowScreenReaders | boolean | Read | Returns whether screen readers are allowed. |
allowAssembly | boolean | Read | Returns whether document assembly is allowed. |
allowDegradedPrinting | boolean | Read | Returns whether degraded printing is allowed. |
printAllowLevel | int | Read | Returns Adobe-style printing permission level. |
changeAllowLevel | int | Read | Returns Adobe-style change permission level. |
copyAllowLevel | int | Read | Returns Adobe-style copy permission level. |
ALLOW_PRINT | int | Read | Bit 3: Allow printing. |
ALLOW_MODIFY_CONTENTS | int | Read | Bit 4: Allow content modification. |
ALLOW_COPY | int | Read | Bit 5: Allow text/graphic extraction. |
ALLOW_MODIFY_ANNOTATIONS | int | Read | Bit 6: Allow adding/modifying annotations and form fields. |
ALLOW_FILL_IN | int | Read | Bit 9: Allow filling in form fields (R>=3). |
ALLOW_SCREEN_READERS | int | Read | Bit 10: Allow text extraction for accessibility (R>=3). |
ALLOW_ASSEMBLY | int | Read | Bit 11: Allow document assembly (R>=3). |
ALLOW_DEGRADED_PRINTING | int | Read | Bit 12: Allow high-quality printing (R>=3). |
Methods
| Signature | Description |
|---|---|
DocumentPrivilege(value: int) | Creates a DocumentPrivilege with the given permission flags. |
getAllowAll() → DocumentPrivilege | Returns a privilege set that allows all operations. |
getForbidAll() → DocumentPrivilege | Returns a privilege set that forbids all operations. |
getValue() → int | Returns the permission bitmask value. |
setValue(value: int) | Sets the permission bitmask value. |
isAllowPrint() → boolean | Returns whether printing is allowed. |
setAllowPrint(allow: boolean) | Sets whether printing is allowed. |
isAllowModifyContents() → boolean | Returns whether content modification is allowed. |
setAllowModifyContents(allow: boolean) | Sets whether content modification is allowed. |
isAllowCopy() → boolean | Returns whether copying content is allowed. |
setAllowCopy(allow: boolean) | Sets whether copying content is allowed. |
isAllowModifyAnnotations() → boolean | Returns whether modifying annotations is allowed. |
setAllowModifyAnnotations(allow: boolean) | Sets whether modifying annotations is allowed. |
isAllowFillIn() → boolean | Returns whether filling in forms is allowed. |
setAllowFillIn(allow: boolean) | Sets whether filling in forms is allowed. |
isAllowScreenReaders() → boolean | Returns whether screen readers are allowed. |
setAllowScreenReaders(allow: boolean) | Sets whether screen readers are allowed. |
isAllowAssembly() → boolean | Returns whether document assembly is allowed. |
setAllowAssembly(allow: boolean) | Sets whether document assembly is allowed. |
isAllowDegradedPrinting() → boolean | Returns whether degraded printing is allowed. |
setAllowDegradedPrinting(allow: boolean) | Sets whether degraded printing is allowed. |
getPrintAllowLevel() → int | Returns Adobe-style printing permission level. |
setPrintAllowLevel(level: int) | Sets Adobe-style printing permission level. |
getChangeAllowLevel() → int | Returns Adobe-style change permission level. |
setChangeAllowLevel(level: int) | Sets Adobe-style change permission level. |
getCopyAllowLevel() → int | Returns Adobe-style copy permission level. |
setCopyAllowLevel(level: int) | Sets Adobe-style copy permission level. |
compareTo(obj: Object) → int |