'Declaration
Public Event PdfPasswordRequest As GdViewer.PdfPasswordRequestHandler
public event GdViewer.PdfPasswordRequestHandler PdfPasswordRequest
public event PdfPasswordRequest: GdViewer.PdfPasswordRequestHandler;
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.PdfPasswordRequestHandler* PdfPasswordRequest
public: event GdViewer.PdfPasswordRequestHandler^ PdfPasswordRequest
Event Data
The event handler receives an argument of type GdViewer.PdfPasswordRequestEventArgs containing data related to this event. The following GdViewer.PdfPasswordRequestEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Handled | (Inherited from System.Windows.RoutedEventArgs) |
OriginalSource | (Inherited from System.Windows.RoutedEventArgs) |
Password | The password required to decrypt the loaded PDF document. |
RoutedEvent | (Inherited from System.Windows.RoutedEventArgs) |
Source | (Inherited from System.Windows.RoutedEventArgs) |
Remarks
This event is only meaningful for PDF documents and it is solely raised only if the PdfShowDialogForPassword property is set to false.
Be aware that without entering the correct password the required PDF document will not display.
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated 'and the PdfPasswordRequest event has been properly added. 'Define the event. Sub GdViewer1_PdfPasswordRequest(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.PdfPasswordRequestEventArgs) 'Display your own dialog box to allow users to insert the correct password. End Sub
//We assume that the GdViewer1 control has been properly integrated //and the PdfPasswordRequest event has been properly added. //Define the event. void GdViewer1_PdfPasswordRequest(object sender, GdPicture14.WPF.GdViewer.PdfPasswordRequestEventArgs e) { //Display your own dialog box to allow users to insert the correct password. }
See Also