THotPDF.EncryptFile Method

Provides encrypt file behaviour for the security workflow. Use it when the surrounding API family needs explicit control over PDF objects, page content, resources, conformance, or diagnostics

Declaration

function EncryptFile(const InputFileName: TFileName; const OutputFileName: TFileName; const OwnerPassword: AnsiString; const UserPassword: AnsiString; KeyType: THPDFKeyType; Permissions: THPDFProtectOptions): Integer;

Unit

HPDFDoc

Parameters

NamePurpose
InputFileNameFile path used as the source or destination for this operation
OutputFileNameFile path used as the source or destination for this operation
OwnerPasswordPassword used for encrypted input or encrypted output workflows
UserPasswordPassword used for encrypted input or encrypted output workflows
KeyTypeInput used by EncryptFile
PermissionsInput used by EncryptFile

Return value

Returns an Integer value

Usage notes

Related APIs