THotPDF.UserPassword Property

 

THotPDF.UserPassword

THotPDF

 

Вгору  Попередня  Наступна

Determines document user password.

 

Delphi syntax:

property UserPassword: AnsiString;

 

C++ syntax:

__property AnsiString UserPassword;

 

Опис

Opening document with correct user password, or opening document without user password, allows additional operations according to user access permissions specified in document encryption dictionary

 

Якщо користувач намагається відкрити encrypted document з user password, viewer application має запросити пароль. Правильне введення будь-якого з паролів дозволяє користувачу відкрити документ і показати його на екрані. Якщо документ не має user password, пароль не запитується

 

Code Example

HPDF.OwnerPassword := 'password';          // Set owner password (required to change security settings)
HPDF.UserPassword := 'user';               // Set user password (required to open the document)
HPDF.ProtectOptions := [poEdit, poAnnot];  // Disallow editing and annotations
HPDF.ActivateProtection := true;           // Enable PDF security

 

See also: ActivateProtection, CryptKeyLength, OwnerPassword, ProtectOptions