SetPageAction

Page properties, actions

Description

Sets an action for opening or closing the currently selected page through its /AA dictionary

The method raises the document compatibility level to PDF 1.5 when successful and is rejected in PDF/A or PDF/X-6 mode

For PDF_ACTION_BUILDER_THREAD, pass the 1-based thread index in Flags and an optional 1-based bead index in DestID

Syntax

Delphi

Function TPDFlib.SetPageAction(Trigger: TPDFlibPageActionTrigger; ActionKind: Integer; Const Value, FieldNames: WideString; Flags, DestID: Integer): Integer;

Parameters

TriggerLifecycle trigger to write: patOpen or patClose
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

GetPageActionInfo, RemovePageAction, SetDocumentAction