vcl-dxpdfdocument-dot-tdxpdfdocument-bfa7fc2c.md
Specifies the number of allowed attempts to enter the document’s protection password.
property PasswordAttemptsLimit: Integer read; write;
| Type | Description |
|---|---|
| Integer |
The number of allowed attempts to enter the loaded document’s user or owner password. If the property value is 0, the number of attempts is unlimited.
|
A LoadFromFile or LoadFromStream procedure call invokes the “Enter Password“ dialog for a PDF document protected with a password.
If a user specifies an incorrect user or owner password required to decrypt the protected document, the “Enter Password“ dialog reopens to allow the user another attempt. The PasswordAttemptLimit property limits the number of times the Enter Password dialog can appear per LoadFromFile or LoadFromStream call. The EdxPDFEncryptionException exception is raised once the last allowed attempt to enter a password fails.
Note
You can handle the OnGetPassword event to enter a password programmatically and disable the “Enter Password“ dialog.
The PasswordAttemptsLimit property’s default value is the dxPDFDefaultPasswordAttemptsLimit global constant.
See Also