Class Permissions
The permissions of an encrypted PDF: the UserAccess flags a reader grants the user, written to the /P entry of the encryption dictionary.
public class Permissions
- Inheritance
-
Permissions
- Inherited Members
Constructors
Permissions()
Creates permissions that grant nothing.
public Permissions()
Permissions(int)
Creates permissions from the /P value of an encryption dictionary, keeping only its permission bits.
public Permissions(int rawFlags)
Parameters
rawFlagsintthe /P value.
Methods
CanAssembleDocument()
Returns true if assembling the document is allowed.
public bool CanAssembleDocument()
Returns
CanCopyContents()
Returns true if copying the contents is allowed.
public bool CanCopyContents()
Returns
CanExtractForAccessibility()
Returns true if extracting the contents for accessibility is allowed.
public bool CanExtractForAccessibility()
Returns
CanFillFormFields()
Returns true if filling form fields is allowed.
public bool CanFillFormFields()
Returns
CanModifyAnnotations()
Returns true if modifying the annotations is allowed.
public bool CanModifyAnnotations()
Returns
CanModifyContents()
Returns true if modifying the contents is allowed.
public bool CanModifyContents()
Returns
CanPrint()
Returns true if printing is allowed.
public bool CanPrint()
Returns
CanPrintHighQuality()
Returns true if printing in high quality is allowed.
public bool CanPrintHighQuality()
Returns
GetAccess()
Returns the granted permissions as UserAccess flags: the /P value without its reserved bits.
public UserAccess GetAccess()
Returns
Grant(UserAccess)
Grants the permissions.
public Permissions Grant(UserAccess permissions)
Parameters
permissionsUserAccessthe UserAccess values combined with bitwise OR.
Returns
Revoke(UserAccess)
Revokes the permissions.
public Permissions Revoke(UserAccess permissions)
Parameters
permissionsUserAccessthe UserAccess values combined with bitwise OR.
Returns
SetAccess(UserAccess)
Sets the granted permissions.
public Permissions SetAccess(UserAccess access)
Parameters
accessUserAccessthe UserAccess values combined with bitwise OR.
Returns
ToString()
Returns the permissions and their /P value.
public override string ToString()