THotPDF.ProtectOptions Property

 

THotPDF.ProtectOptions

THotPDF

 

顶部  上一页  下一页

Determines PDF file protection options.

 

type

THPDFProtection = (prPrint, prModifyStructure, prInformationCopy, prEditAnnotations, prPrint12bit, prFillAnnotations, prExtractContent, prAssemble);

 

Delphi 语法:

property ProtectOptions: THPDFProtection;

 

C++ 语法:

__property THPDFProtectOptions ProtectOptions;

 

说明

使用 ProtectOptions 确定以 user access 打开文档时允许的 protection options

 

Value                Meaning


prPrint                Allow printing (permission bit 3). Without prPrint12bit, viewers may limit printing to a low-quality representation.

prModifyStructure        Allow modify the contents of the document.

prInformationCopy        Allow copy information about the document.

prEditAnnotations        Allow edit the annotation text.

prPrint12bit                Allow printing at full quality (permission bit 12). It only takes effect together with prPrint; without prPrint the document cannot be printed at all.

prFillAnnotations        Allow add or modify text annotations.

prExtractContent        Allow copy or otherwise extract text and graphics from the document.

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

 

代码示例

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