Back to Devexpress

TdxPDFDocument.PasswordAttemptsLimit Property

vcl-dxpdfdocument-dot-tdxpdfdocument-bfa7fc2c.md

latest2.6 KB
Original Source

TdxPDFDocument.PasswordAttemptsLimit Property

Specifies the number of allowed attempts to enter the document’s protection password.

Declaration

delphi
property PasswordAttemptsLimit: Integer read; write;

Property Value

TypeDescription
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.

|

Remarks

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

Password Protection

TdxPDFDocument Class

TdxPDFDocument Members

dxPDFDocument Unit