SetOpenActionEx
Document properties, Destinations and actions
Description
Builds a document open action through one compact dispatcher for common open-document workflows
ActionKind 0 removes the open action, 1 runs a named menu item, 2 opens a page destination, 3 opens a named destination, and 4 runs JavaScript when the document is opened
Syntax
Delphi
Function TPDFlib.SetOpenActionEx(ActionKind: Integer; Const Value: WideString; OpenPage, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer;
Parameters
| ActionKind | 0 remove, 1 named menu action, 2 page destination, 3 named destination, 4 JavaScript |
|---|---|
| Value | The menu item, named destination, or JavaScript source used by the selected action kind |
| OpenPage | The page number used when ActionKind is 2 |
| Zoom | The zoom percentage used for XYZ page destinations |
| DestType | 0 uses the simple page and zoom destination. Non-zero values use the full destination type mapping |
| Left | The left or horizontal coordinate used by destination types that need it |
| Top | The top or vertical coordinate used by destination types that need it |
| Right | The right coordinate used by rectangle destinations |
| Bottom | The bottom coordinate used by rectangle destinations |
Return values
| 0 | The requested open action could not be created or removed |
|---|---|
| 1 | The open action was updated |