THotPDF.OwnerPassword Property

 

THotPDF.OwnerPassword

THotPDF

 

先頭  前へ  次へ

Determines document owner password.

 

Delphi syntax:

property OwnerPassword: AnsiString;

 

C++ syntax:

__property AnsiString OwnerPassword;

 

説明

正しい user password で document を開く場合、または user password のない document を開く場合、document の encryption dictionary に指定された user access permissions に従って追加 operations を実行できます

 

AES-256 暗号化(revision 5 または 6)では、パスワードは UTF-8 として扱われ、ISO 32000-2 の定義どおり最初の 127 バイトだけが使われます。HotPDF は AnsiString をコードページ(通常はシステムのもの)から変換するので、非 ASCII 文字を含むパスワードでも、準拠したリーダーならファイルを開けます。コードページで保持できない文字は、Unicode 文字列をこの AnsiString プロパティに代入した時点で失われます。RC4 と AES-128 は、与えられたパスワードのバイトをそのまま使います

 

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 := [prPrint, prInformationCopy]; // Allow printing and copying only
HPDF.ActivateProtection := true;           // Enable PDF security

 

関連項目: ActivateProtection, CryptKeyLength, ProtectOptions, UserPassword