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
| Name | Purpose |
|---|---|
InputFileName | File path used as the source or destination for this operation |
OutputFileName | File path used as the source or destination for this operation |
OwnerPassword | Password used for encrypted input or encrypted output workflows |
UserPassword | Password used for encrypted input or encrypted output workflows |
KeyType | Input used by EncryptFile |
Permissions | Input used by EncryptFile |
Return value
Returns an Integer value
Usage notes
- Use this API in the security workflow before the affected page, resource, field, or catalog object is finalised
- Keep object names, field names, resource names, and returned handles stable until the document is finalised