The following objects are related to PDF Layers and are responsible for their visibility:
Layers
Each layer has a name and a visibility state for the containers connected to the layer through a Dictionary. The visibility state can have one of two values - ON or OFF.
Dictionaries
Each dictionary contains the array of layers and a Boolean property, which takes all the layers' states as input and applies the visibility policy to the layers' state values producing the Boolean result whether or not to display all the objects from the dictionary's container. The output can have one of two values - ON or OFF.
Containers
Each container is an arbitrary set of PDF elements or other containers. Each container is associated with a dictionary. The container and all its elements (including the other containers) are displayed when its dictionary's visibility policy Boolean property results with ON.
The following diagram shows the relationship between containers and the other PDF document objects:
PDF Objects and Layers Diagram
The following diagram shows interconnection between PDF objects and layers:
Visibility Policy
A Dictionary Boolean property defines the visibility policy. It can be one of the following:
AllOn
- equivalent to "AND" for all input parametersAnyOn
- equivalent to "OR" for all input parametersAnyOff
- equivalent to "NOT-OR" for all input parametersAllOff
- equivalent to "NOT-AND" for all input parameters
In other words:
value | description |
---|---|
AllOn | All the containers from the dictionary will be displayed when all the input layers' states are 'ON' |
AnyOn | All the containers from the dictionary will be displayed when at least one of the input layers state is 'ON' |
AnyOff | All the containers from the dictionary will be displayed when at least one of the input layers state is 'OFF' |
AllOff | All the containers from the dictionary will be displayed when all the input layers' states are 'OFF' |
For more information, see the following API sections: ImGearPDFDictionary
Class, ImGearPDFDocument
Class, and ImGearPDFLayer
Class.