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

TriggerThe document lifecycle trigger
ActionKindOne of the PDF_ACTION_BUILDER_* constants
ValueThe URI, script or file value required by the selected action kind
FieldNamesA semicolon-delimited field list for form actions
FlagsAction-specific flags, the named-action selector or the 1-based thread index for PDF_ACTION_BUILDER_THREAD
DestIDA destination handle, or an optional 1-based bead index for PDF_ACTION_BUILDER_THREAD

Return values

0The action was rejected or could not be created
1The action was set

See also

GetDocumentActionInfo, RemoveDocumentAction, SetPageAction