THPDFOCGActionState Type
Selects the state change a SetOCGState action applies to an optional content group
Declaration
THPDFOCGActionState= (ocgasOn, ocgasOff, ocgasToggle);
Unit
HPDFDoc
Values
| Value | Meaning |
|---|---|
ocgasOn | Turn the target optional content group ON |
ocgasOff | Turn the target optional content group OFF |
ocgasToggle | Flip the target optional content group to the opposite of its current state |
Usage notes
- Pass a value of this type to THPDFActionBuilder.SetOCGState together with a registered layer name; the library writes the matching name (ON, OFF, Toggle) into the action's /State array
- The target layer must be registered with the document, otherwise the builder raises before any PDF content is produced
- SetOCGState actions are commonly attached to link or widget annotations to build layer switch controls