THPDFOCGActionState Type
Selects the state change that a SetOCGState action applies to an optional content group
Declaration
THPDFOCGActionState= (ocgasOn, ocgasOff, ocgasToggle);
Unit
HPDFDoc
Values
| Value | Meaning |
|---|---|
ocgasOn | Switch the target optional content group ON |
ocgasOff | Switch the target optional content group OFF |
ocgasToggle | Flip the target optional content group over to the opposite of its current state |
Usage notes
- Pass a value of this type to THPDFActionBuilder.SetOCGState along 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 so as to build layer switch controls