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

ActionKind0 remove, 1 named menu action, 2 page destination, 3 named destination, 4 JavaScript
ValueThe menu item, named destination, or JavaScript source used by the selected action kind
OpenPageThe page number used when ActionKind is 2
ZoomThe zoom percentage used for XYZ page destinations
DestType0 uses the simple page and zoom destination. Non-zero values use the full destination type mapping
LeftThe left or horizontal coordinate used by destination types that need it
TopThe top or vertical coordinate used by destination types that need it
RightThe right coordinate used by rectangle destinations
BottomThe bottom coordinate used by rectangle destinations

Return values

0The requested open action could not be created or removed
1The open action was updated