AddActionNextSetOCGState
Actions, optional content
Description
Appends a typed SetOCGState action to an existing action /Next chain
Syntax
Function TPDFlib.AddActionNextSetOCGState(ActionID: Integer; Const States: Array Of TPDFlibActionOCGStateInfo; PreserveRB: Integer): Integer;Parameters
| ActionID | Existing action handle that receives the SetOCGState action |
|---|---|
| States | Ordered group and state entries of type TPDFlibActionOCGStateInfo; the array must not be empty, every group must belong to the selected document, and repeated groups keep their positions |
| PreserveRB | -1 omits /PreserveRB, 0 stores false and 1 stores true |
Return values
Returns 1 on success or 0 without changing the chain when an action, group handle or preference is invalid, PDF/A-1 mode is active or PDF/X-6 mode is active
Remarks
The action supports oscOn, oscOff and oscToggle entries in any order and permits the same group to appear more than once
See also
SetActionOCGStates, SetFormFieldOCGStateAction, GetActionNextInfo