ImageGear Professional > User Guide > Using ImageGear > Advanced Image Formats > Adobe PDF > Working with PDF Layers |
For more information, see Using ImageGear PDF Component and HIG_PDF_DICTIONARY and HIG_PDF_LAYER.
The following objects are related to PDF Layers and responsible for the visibility.
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.
Each dictionary contains the array of layers and a Boolean function, which takes all the layers' states as input and applies the visibility policy function 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.
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 function results with ON.
The following diagram shows the relationship between containers and the other PDF document objects:
The following diagram shows interconnection between PDF objects and layers:
Dictionary Boolean functions define the visibility policy. It can be one of the following:
In other words:
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' |
Before creating a container you need to create one or more layers using the View -> Layers menu. Make sure to create some simple elements like text, paths or images as well.
In order to create container right click on the PDF page and select Create -> Container. You will be prompted to select all the layers you want to associate with the containers dictionary, which will affect the container's visibility. You also need to select the visibility policy and check all the elements you want to include into the new container. When container is created a new dictionary is automatically created as well.
To show or hide the container's elements use View -> Layers menu to change the layer's state to ON or OFF.
In order to rearrange the container's elements you can right click to delete the existing container, which will free its elements and create the new one.