THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property THotPDF.UserPassword Property

 

THotPDF.UserPassword

THotPDF

 

Top  Previous  Next

Determines password utente del documento.

 

Sintassi Delphi:

property UserPassword: AnsiString;

 

Sintassi C++:

__property AnsiString UserPassword;

 

Descrizione

Aprire il documento con la password utente corretta (o aprire un documento che non ha una password utente) consente di eseguire operazioni aggiuntive secondo i permessi di accesso utente specificati nel dizionario di cifratura del documento.

 

If a user attempts to open an encrypted document that has a user password, the viewer application should prompt for a password. Correctly supplying either password allows the user to open the document, and display it on the screen. If the document does not have a user password, no password is requested;

Con cifratura AES-256 (revisione 5 o 6) la password viene considerata UTF-8 e se ne usano solo i primi 127 byte, come definito da ISO 32000-2. HotPDF converte la AnsiString dalla sua code page, di norma quella di sistema, così una password con lettere non ASCII apre il file in qualunque reader conforme. Le lettere che la code page non può rappresentare si perdono quando si assegna una stringa Unicode a questa proprietà AnsiString. RC4 e AES-128 usano i byte della password così come sono

 

 

Esempio di codice

HPDF.OwnerPassword := 'password';          // Set owner password (required to change security settings)
HPDF.UserPassword := 'user';               // Set user password (required to open the document)
HPDF.ProtectOptions := [prPrint, prInformationCopy]; // Allow printing and copying only
HPDF.ActivateProtection := true;           // Enable PDF security

 

Vedi anche: ActivateProtection, CryptKeyLength, OwnerPassword, ProtectOptions