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, יישום ה-viewer צריך לבקש סיסמה. אספקה נכונה של אחת מהסיסמאות מאפשרת לפתוח את המסמך ולהציג אותו על המסך. אם למסמך אין 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