THotPDF.ActivateProtection Property

 

THotPDF.ActivateProtection

THotPDF

 

顶部  上一页  下一页

Determines whether the PDF document is encrypted.

 

Delphi 语法:

property ActivateProtection: Boolean;

 

C++ 语法:

__property bool ActivateProtection;

 

说明

A PDF document can be encrypted to protect its contents from unauthorized access. Set ActivateProtection to true to enable PDF encryption or Set ActivateProtection to false to disable PDF encryption.

默认值:false(opt-in,用于保留文本 xref table,以兼容硬编码 xref 关键字的工具,并最大化 PDF 1.4 / 更早阅读器兼容性)

 

代码示例

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

 

另请参阅: CryptKeyLength, OwnerPassword, ProtectOptions, UserPassword