THotPDF.ProtectOptions Property

 

THotPDF.ProtectOptions

THotPDF

 

Top  Previous  Next

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;

 

Description

Use ProtectOptions to determine protection options which are permitted when the document is opened with user access

 

Value                Meaning


prPrint                Permits printing (permission bit 3); without prPrint12bit, viewers are free to restrict printing to a low-quality rendition

prModifyStructure        Allow modify the contents of the document

prInformationCopy        Allow copy information about the document

prEditAnnotations        Allow edit the annotation text

prPrint12bit                Permits printing at full quality (permission bit 12), and only has an effect alongside 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).

 

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

 

See also: ActivateProtection, CryptKeyLength, OwnerPassword, UserPassword