SetDocumentAction
Document properties, actions
Description
Sets the action executed for a document lifecycle trigger in the Catalog /AA dictionary
The action is created through the same builder kinds used by form, annotation and chained actions
Document lifecycle actions are rejected while PDF/A or PDF/X-6 mode is active
Syntax
Delphi
Function TPDFlib.SetDocumentAction(Trigger: TPDFlibDocumentActionTrigger; ActionKind: Integer; Const Value, FieldNames: WideString; Flags, DestID: Integer): Integer;Parameters
| Trigger | The document lifecycle trigger |
|---|---|
| ActionKind | One of the PDF_ACTION_BUILDER_* constants |
| Value | The URI, script or file value required by the selected action kind |
| FieldNames | A semicolon-delimited field list for form actions |
| Flags | Action-specific flags, the named-action selector or the 1-based thread index for PDF_ACTION_BUILDER_THREAD |
| DestID | A destination handle, or an optional 1-based bead index for PDF_ACTION_BUILDER_THREAD |
Return values
| 0 | The action was rejected or could not be created |
|---|---|
| 1 | The action was set |