PdfPermissions class

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 = await document.save();
//Dispose the document.
document.dispose();

Properties

count int
Get the permissions count.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 nonexistent 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.