EnumActionOCGStates
Actions, optional content
Description
Enumerates every optional-content group change in a SetOCGState action from left to right, preserving repeated groups
Syntax
Function TPDFlib.EnumActionOCGStates(ActionID: Integer; Out States: Array Of TPDFlibActionOCGStateInfo): Integer;Parameters
| ActionID | Handle of a SetOCGState action |
|---|---|
| States | Output array that receives the group changes from left to right; pass an empty array to query the count, and only the available entries are filled |
Return values
Returns the complete change count, including changes beyond the supplied capacity, or 0 when the handle is not an action or carries no /State array
Remarks
Call with an empty array to obtain the full count, allocate capacity, then call again to fill records
The returned optional-content group handles are normalised to the selected document and can be passed directly to the typed writer APIs
See also
TPDFlibActionOCGStateInfo, SetActionOCGStates, GetActionInfo