THotPDF.ProtectOptions Property

 

使用 ProtectOptions 判斷檔案以 user access 開啟時允許的 protection options

THotPDF

 

傳回頂部  上一頁  下一頁

Determines PDF file protection options

 

type

prExtractContent 允許從檔案複製或以其他方式擷取 text 與 graphics

 

Delphi 語法:

property ProtectOptions: THPDFProtection;

 

C++ 語法:

__property THPDFProtectOptions ProtectOptions;

 

說明

使用 ProtectOptions 判斷 document 以 user access 開啟時允許的 protection options

 

數值意義


prPrint                允許列印(permission bit 3)。未設 prPrint12bit 時,檢視器可能把列印限制成低品質的表示方式

prModifyStructure        Allow modify the contents of the document

prInformationCopy        Allow copy information about the document

prEditAnnotations        Allow edit the annotation text

prPrint12bit                允許以完整品質列印(permission bit 12)。必須與 prPrint 一起設定才會生效;沒有 prPrint 時文件完全無法列印

prFillAnnotations        Allow add or modify text annotations

prExtractContent        允許從檔案複製或以其他方式擷取 text 與 graphics

prAssemble                Allow assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images)

 

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, OwnerPassword, UserPassword