Thuộc tính THotPDF.ProtectOptions

 

THotPDF.ProtectOptions

THotPDF

 

Đầu trang  Trước  Tiếp

Xác định các tùy chọn bảo vệ của tệp PDF

 

type

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

 

Cú pháp Delphi:

property ProtectOptions: THPDFProtection;

 

Cú pháp C++:

__property THPDFProtectOptions ProtectOptions;

 

Mô tả

Dùng ProtectOptions để xác định các tùy chọn bảo vệ được phép khi tài liệu được mở bằng quyền người dùng

 

Giá trị                Ý nghĩa


prPrint                Allow print the document.

prModifyStructure        Allow modify the contents of the document.

prInformationCopy        Allow copy information about the document.

prEditAnnotations        Allow edit the annotation text.

prPrint12bit                Allow print the document (possibly not at the highest quality level, depending on whether bit 12 is also set).

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

 

Ví dụ mã

HPDF.OwnerPassword := 'password';          // Set owner password (required to change security settings)
HPDF.UserPassword := 'user';               // Set user password (required to open the document)
HPDF.ProtectOptions := [poEdit, poAnnot];  // Disallow editing and annotations
HPDF.ActivateProtection := true;           // Enable PDF security

 

Xem thêm: ActivateProtection, CryptKeyLength, OwnerPassword, UserPassword