class HexaPDF:: Type:: Actions:: SetOCGState
Parent | HexaPDF::Type::Action |
---|
A Set-OCG-state action changes the state of one or more optional content groups.
See: PDF2.0 s12.6.4.13, HexaPDF::Type::OptionalContentGroup
Field Definitions
Name | Type/Allowed Values | Required | Default Value |
---|---|---|---|
Type | Symbol | false | :Action |
S | Symbol | true | nil |
Next | HexaPDF::Dictionary or HexaPDF::PDFArray or Hash or Array | false | nil |
S | Symbol | true | :SetOCGState |
State | HexaPDF::PDFArray or Array | true | [] |
PreserveRB | TrueClass or FalseClass | false | true |
Public Instance Methods
Adds a state changing sequence to the /State array.
The type
argument specifies how the state of the given optional content groups should be changed.
type
-
The type of sequence to add, either :on/:ON (for turning the OCGs on) , :off/:OFF (for turning the OCGs off), or :toggle/:Toggle (for toggling the state of the OCGs).
ocgs
-
A single optional content group or an array of optional content groups to which the state change defined with
type
should be applied. The OCGs can be specified via their dictionary or by name which uses the first found OCG with that name.