Creating Groups of Layers

The PDF format allows creating groups of mutually exclusive layers where showing one layer will automatically hide the other layer. These are called radio-button groups and defined using the RBGroups PDF keyword. One can also define which layers are visible by default and which are hidden. For example:

 

/RBGroups [[ 11 0 R 13 0 R]]  /ON[ 11 0 R] /OFF [13 0 R]

 

indicates that layers 11 and 13 are grouped and that layer 11 is visible by default whereas 13 is invisible.