EncodePermissions

Security and Signatures

Description

Create a value for the Permissions parameter of the Encrypt function.

Syntax

Delphi

function TPDFlib.EncodePermissions(CanPrint, CanCopy, CanChange, CanAddNotes, CanFillFields, CanCopyAccess, CanAssemble, CanPrintFull: Integer): Integer;

ActiveX

Function PDFlib::EncodePermissions(CanPrint As Long, CanCopy As Long, CanChange As Long, CanAddNotes As Long, CanFillFields As Long, CanCopyAccess As Long, CanAssemble As Long, CanPrintFull As Long) As Long

DLL

int DLEncodePermissions(int InstanceID, int CanPrint, int CanCopy, int CanChange, int CanAddNotes, int CanFillFields, int CanCopyAccess, int CanAssemble, int CanPrintFull);

Parameters

CanPrintSet this to 1 to allow the user to print the document
CanCopySet this to 1 to allow the user to copy text and graphics from the document
CanChangeSet this to 1 to allow the user to edit the document
CanAddNotesSet this to 1 to allow the user to add annotations Set this to 1 to allow the user to fill in form fields. Only works with 128-bit encryption.
CanFillFieldsSet this to 1 to enable copying for use with accessibility features. Only works with 128-bit encryption.
CanCopyAccessSet this to 1 to allow the user to assemble the document. Only works with 128-bit encryption.
CanAssemble
CanPrintFullSet this to 0 to force low-resolution printing of the document only. This prevents the document from being distilled into a new PDF document. Only works with 128-bit encryption or higher.

Return values

Result is a 32-bit encoded number which should be passed to the Encrypt function int CanChange, int CanAddNotes, int CanFillFields, int CanCopyAccess, int CanAssemble, int CanPrintFull);