Reference Guide
GdPicture14.WPF Namespace / GdViewer Class / PreviewPdfPasswordRequest Event

In This Topic
    PreviewPdfPasswordRequest Event
    In This Topic
    This event is raised if a password is required to decrypt the loaded PDF document for display. The event is explicitly raised when the PdfShowDialogForPassword property is set to false.

    The event makes use of tunel routing strategy. Please check the corresponded GdViewer.PdfPasswordRequestEventArgs for given parameters.

    You are allowed to prompt the user with your own dialog box for entering the password for protected PDF documents using this event.

    Public Event PreviewPdfPasswordRequest As GdViewer.PreviewPdfPasswordRequestHandler
    public event GdViewer.PreviewPdfPasswordRequestHandler PreviewPdfPasswordRequest
    public event PreviewPdfPasswordRequest: GdViewer.PreviewPdfPasswordRequestHandler; 
    In JScript, you can handle the events defined by another class, but you cannot define your own.
    public: __event GdViewer.PreviewPdfPasswordRequestHandler* PreviewPdfPasswordRequest
    event GdViewer.PreviewPdfPasswordRequestHandler^ PreviewPdfPasswordRequest
    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.

    (Inherited from System.Windows.RoutedEventArgs)
    (Inherited from System.Windows.RoutedEventArgs)
    The password required to decrypt the loaded PDF document.  
    (Inherited from System.Windows.RoutedEventArgs)
    (Inherited from System.Windows.RoutedEventArgs)
    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.

    Please follow the example for the PdfPasswordRequest event to motivate yourself on how to utilize this event in your GdViewer control.
    See Also