Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxPDFDocument.OnGetPassword Event

In This Article

Enables you to respond to the password request when the PDF document container loads an encrypted document.

#Declaration

Delphi
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