DocumentPrivilege

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

NameTypeAccessDescription
allowAllDocumentPrivilegeReadReturns a privilege set that allows all operations.
forbidAllDocumentPrivilegeReadReturns a privilege set that forbids all operations.
valueintReadReturns the permission bitmask value.
allowPrintbooleanReadReturns whether printing is allowed.
allowModifyContentsbooleanReadReturns whether content modification is allowed.
allowCopybooleanReadReturns whether copying content is allowed.
allowModifyAnnotationsbooleanReadReturns whether modifying annotations is allowed.
allowFillInbooleanReadReturns whether filling in forms is allowed.
allowScreenReadersbooleanReadReturns whether screen readers are allowed.
allowAssemblybooleanReadReturns whether document assembly is allowed.
allowDegradedPrintingbooleanReadReturns whether degraded printing is allowed.
printAllowLevelintReadReturns Adobe-style printing permission level.
changeAllowLevelintReadReturns Adobe-style change permission level.
copyAllowLevelintReadReturns Adobe-style copy permission level.
ALLOW_PRINTintReadBit 3: Allow printing.
ALLOW_MODIFY_CONTENTSintReadBit 4: Allow content modification.
ALLOW_COPYintReadBit 5: Allow text/graphic extraction.
ALLOW_MODIFY_ANNOTATIONSintReadBit 6: Allow adding/modifying annotations and form fields.
ALLOW_FILL_INintReadBit 9: Allow filling in form fields (R>=3).
ALLOW_SCREEN_READERSintReadBit 10: Allow text extraction for accessibility (R>=3).
ALLOW_ASSEMBLYintReadBit 11: Allow document assembly (R>=3).
ALLOW_DEGRADED_PRINTINGintReadBit 12: Allow high-quality printing (R>=3).

Methods

SignatureDescription
DocumentPrivilege(value: int)Creates a DocumentPrivilege with the given permission flags.
getAllowAll()DocumentPrivilegeReturns a privilege set that allows all operations.
getForbidAll()DocumentPrivilegeReturns a privilege set that forbids all operations.
getValue()intReturns the permission bitmask value.
setValue(value: int)Sets the permission bitmask value.
isAllowPrint()booleanReturns whether printing is allowed.
setAllowPrint(allow: boolean)Sets whether printing is allowed.
isAllowModifyContents()booleanReturns whether content modification is allowed.
setAllowModifyContents(allow: boolean)Sets whether content modification is allowed.
isAllowCopy()booleanReturns whether copying content is allowed.
setAllowCopy(allow: boolean)Sets whether copying content is allowed.
isAllowModifyAnnotations()booleanReturns whether modifying annotations is allowed.
setAllowModifyAnnotations(allow: boolean)Sets whether modifying annotations is allowed.
isAllowFillIn()booleanReturns whether filling in forms is allowed.
setAllowFillIn(allow: boolean)Sets whether filling in forms is allowed.
isAllowScreenReaders()booleanReturns whether screen readers are allowed.
setAllowScreenReaders(allow: boolean)Sets whether screen readers are allowed.
isAllowAssembly()booleanReturns whether document assembly is allowed.
setAllowAssembly(allow: boolean)Sets whether document assembly is allowed.
isAllowDegradedPrinting()booleanReturns whether degraded printing is allowed.
setAllowDegradedPrinting(allow: boolean)Sets whether degraded printing is allowed.
getPrintAllowLevel()intReturns Adobe-style printing permission level.
setPrintAllowLevel(level: int)Sets Adobe-style printing permission level.
getChangeAllowLevel()intReturns Adobe-style change permission level.
setChangeAllowLevel(level: int)Sets Adobe-style change permission level.
getCopyAllowLevel()intReturns Adobe-style copy permission level.
setCopyAllowLevel(level: int)Sets Adobe-style copy permission level.
compareTo(obj: Object)int

See Also