Skip to main content

TdxPDFCustomViewer.OnGetPassword Event

Enables you to respond to the password request when the PDF Viewer control starts to load an encrypted document.

Declaration

property OnGetPassword: TdxGetPasswordEvent read; write;

Remarks

This event occurs every time the LoadFromFile or LoadFromStream procedure accepts a PDF document protected with a password. Handle the OnGetPassword event to disable the “Enter Password“ dialog and pass a user or owner password as the Password parameter.

The Sender parameter provides access to the PDF control that raised the OnGetPassword event. Cast the parameter value to the TdxPDFViewer class to access the control’s public API members.

The Password parameter accepts a password required to decrypt the loaded document.

Refer to the following topic for detailed information on encrypted PDF documents: Password Protection

See Also