PdfPermissions class Null safety

Represents the permissions of the PDF document.

//Create a new PDF document.
PdfDocument document = PdfDocument();
//Document security
PdfSecurity security = document.security;
//Set security options
security.algorithm = PdfEncryptionAlgorithm.rc4x128Bit;
security.userPassword = 'password';
security.ownerPassword = 'syncfusion';
//Get PDF permission.
PdfPermissions permissions = security.permissions;
//Add permissions.
permissions.add(<PdfPermissionsFlags>[PdfPermissionsFlags.print]);
//Save the document.
List<int> bytes = document.save();
//Dispose the document.
document.dispose();

Properties

count int
Get the permissions count. [...]
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

add(PdfPermissionsFlags permission) → void
Add the permission. [...]
addAll(List<PdfPermissionsFlags> permission) → void
Add the permissions. [...]
clear() → void
Remove all permissions from an existing PDF and set default. [...]
forEach(void action(PdfPermissionsFlags element)) → void
Iterate for each element in permissions and perform action. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
remove(PdfPermissionsFlags permission) → void
Remove permissions from an existing PDF. [...]
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited
operator [](int index) PdfPermissionsFlags
Get the permissions. [...]