Table of Contents

Class OnPdfPasswordEventArgs

Namespace
Syncfusion.Pdf.Parsing
Assembly
Syncfusion.Pdf.Portable.dll

Arguments of Pdf Password.

public class OnPdfPasswordEventArgs
Inheritance
OnPdfPasswordEventArgs
Inherited Members

Examples

// Creates a new document
 PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
// Subscribe the On pdf password event 
lDoc.OnPdfPassword += LDoc_OnPdfPassword;
//Access the attachments
PdfAttachmentCollection attachment=lDoc.Attachments;
//Save the document
lDoc.save("Ouput.pdf");        
// On Pdf Password event handler
void LDoc_OnPdfPassword(object sender, OnPdfPasswordEventArgs args)
{
 args.UserPassword = "syncfusion";
}

Properties

UserPassword

Gets or sets a value of pdf password.

public string UserPassword { get; set; }

Property Value

string

Examples

// Creates a new document
 PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
// Subscribe the On pdf password event 
lDoc.OnPdfPassword += LDoc_OnPdfPassword;
//Access the attachments
PdfAttachmentCollection attachment=lDoc.Attachments;
//Save the document
lDoc.save("Ouput.pdf");        
// On Pdf Password event handler
void LDoc_OnPdfPassword(object sender, OnPdfPasswordEventArgs args)
{
 args.UserPassword = "syncfusion";
}