Table of Contents

Delegate PdfLoadedDocument.OnPdfPasswordEventHandler

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

Delegate for handling Pdf Password.

public delegate void PdfLoadedDocument.OnPdfPasswordEventHandler(object sender, OnPdfPasswordEventArgs args)

Parameters

sender object
args OnPdfPasswordEventArgs

Examples

// Creates a new document
 PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf");
// Subscribe the On pdf password event 
lDoc.OnPdfPassword += new OnPdfPasswordEventHandler(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";
}

Constructors

OnPdfPasswordEventHandler(object, nint)

public OnPdfPasswordEventHandler(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(object, OnPdfPasswordEventArgs, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(object sender, OnPdfPasswordEventArgs args, AsyncCallback callback, object @object)

Parameters

sender object
args OnPdfPasswordEventArgs
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual void EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Invoke(object, OnPdfPasswordEventArgs)

public virtual void Invoke(object sender, OnPdfPasswordEventArgs args)

Parameters

sender object
args OnPdfPasswordEventArgs