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