PdfPasswordArgs class Null safety

Arguments of Pdf Password.

//Load an existing PDF document
PdfDocument document =
    PdfDocument(inputBytes: File('input.pdf').readAsBytesSync())
      //Subsribe the onPdfPassword event
      ..onPdfPassword = loadOnPdfPassword;
//Access the attachments
PdfAttachmentCollection attachmentCollection = document.attachments;
//Iterates the attachments
for (int i = 0; i < attachmentCollection.count; i++) {
  //Extracts the attachment and saves it to the disk
  File(attachmentCollection[i].fileName)
      .writeAsBytesSync(attachmentCollection[i].data);
}
//Disposes the document
document.dispose();

void loadOnPdfPassword(PdfDocument sender, PdfPasswordArgs args) {
  //Sets the value of PDF password.
  args.attachmentOpenPassword = 'syncfusion';
}

Properties

attachmentOpenPassword String?
A value of PDF password. [...]
read / write
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited