THotPDF.DADirectEncryptFileAES256 Method

Provides the DADirectEncryptFileAES256 behavior 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 DADirectEncryptFileAES256(const InputFileName: TFileName; const OutputFileName: TFileName; const OwnerPassword: AnsiString; const UserPassword: AnsiString; Permissions: THPDFProtectOptions; UseAESGCM: boolean): boolean;

Unit

HPDFDoc

Parameters

NamePurpose
InputFileNameUnencrypted source PDF
OutputFileNameEncrypted PDF to write
OwnerPasswordOwner password
UserPasswordUser password; an empty one lets anyone open the file
PermissionsPermissions granted to users who open the file with the user password
UseAESGCMTrue writes AES-GCM crypt filters, False AES-256-CBC

Return value

Returns a boolean value

Usage notes

Related APIs