THotPDF.UserPassword Property

 

THotPDF.UserPassword

THotPDF

 

الأعلى  السابق  التالي

Determines document user password.

 

Delphi syntax:

property UserPassword: AnsiString;

 

C++ syntax:

__property AnsiString UserPassword;

 

الوصف

فتح المستند بكلمة مرور user الصحيحة، أو فتح مستند لا يملك user password، يسمح بتنفيذ عمليات إضافية وفق أذونات user access المحددة في قاموس تشفير المستند

 

إذا حاول مستخدم فتح مستند مشفر له user password، فيجب أن يطلب تطبيق العارض كلمة المرور. إدخال أي من كلمتي المرور بشكل صحيح يسمح بفتح المستند وعرضه على الشاشة. إذا لم يكن للمستند 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

 

انظر أيضا: ActivateProtection, CryptKeyLength, OwnerPassword, ProtectOptions