THotPDF.OwnerPassword Property

 

THotPDF.OwnerPassword

THotPDF

 

傳回頂部  上一頁  下一頁

Determines document owner password

 

Delphi 語法:

property OwnerPassword: AnsiString;

 

C++ 語法:

__property AnsiString OwnerPassword;

 

說明

使用正確的 owner password 開啟 document(假設它不同於 user password)時,可取得 document 的完整 owner access。此無限制存取權包含變更 document passwords 與 access permissions 的能力

 

AES-256 加密(revision 5 或 6)下,密碼按 UTF-8 解讀,且只取前 127 個位元組,這是 ISO 32000-2 的定義。HotPDF 會把 AnsiString 自其 code page(通常是系統 code page)轉換,因此含非 ASCII 字母的密碼在任何符合標準的閱讀器中都能開啟檔案。把 Unicode 字串指派給這個 AnsiString 屬性時,code page 無法表示的字母會遺失。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