Expand description
Optional Content Group hierarchy and configurations.
Defined in ISO 32000-2 §8.11.4. Each PDF carries one default
configuration (/OCProperties /D) and an optional array of
alternate configurations (/OCProperties /Configs); a configuration
says which layers are initially on/off, how they’re presented in a
UI tree (/Order), how their visibility is grouped (/RBGroups),
and which layers cannot be toggled by the user (/Locked).
This module turns each configuration dict into a typed
Configuration and exposes the hierarchy as a LayerTree.
Structs§
- Auto
State Rule - One
/ASautomatic-state rule. - Configuration
- One configuration of layer state and presentation.
- Layer
Tree - A presentation hierarchy for layers, parsed from
/Order.
Enums§
- Auto
State Event /Eventvalue on an/ASrule.- Base
State /BaseStatevalue.- Layer
Tree Node - One node in the layer tree.
- List
Mode /ListMode— layer-panel visibility scope.
Functions§
- parse_
auto_ state - Parse
/AS— an array of rule dicts. - parse_
configuration - Parse a single configuration dict (the
/Ddict or one/Configs[i]). - parse_
configurations - Walk
/OCPropertiesand produce oneConfigurationfor the default/Dplus one for each entry in/Configs. - parse_
order - Parse
/Orderaccording to ISO 32000-2 §8.11.4.3. - parse_
rb_ groups - Parse
/RBGroups— an array of nested arrays, each containing OCG refs.