Skip to main content

TdxPDFDocument.OnGetPassword Event

Enables you to respond to the password request when the PDF document container loads 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 document container that raised the OnGetPassword event. Cast the parameter value to the TdxPDFDocument class to access the container’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

Note

The PDF Viewer control handles its Document.OnGetPassword event. If you work with the PDF Viewer, handle its OnGetPassword event instead.

See Also