THotPDF.ProtectOptions Property

 

THotPDF.ProtectOptions

THotPDF

 

Вверх  Назад  Далее

Determines PDF file protection options.

 

type

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

 

Delphi syntax:

property ProtectOptions: THPDFProtection;

 

C++ syntax:

__property THPDFProtectOptions ProtectOptions;

 

Описание

Используйте ProtectOptions, чтобы задать параметры защиты, разрешенные при открытии документа с пользовательским доступом

 

Value                Meaning


prPrint                Разрешает печать (бит разрешений 3). Без prPrint12bit вьюеры могут ограничивать печать низкокачественным представлением

prModifyStructure        Allow modify the contents of the document.

prInformationCopy        Allow copy information about the document.

prEditAnnotations        Allow edit the annotation text.

prPrint12bit                Разрешает печать в полном качестве (бит разрешений 12). Действует только вместе с prPrint; без prPrint документ вообще нельзя печатать

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).

 

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