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 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 or named-action selector
DestIDA destination handle for destination actions

Return values

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

See also

GetDocumentActionInfo, RemoveDocumentAction, SetPageAction