ImageGear v26.3 - Updated
Developer Guide / How to Work with ... / PDF / How to... / Manage PDF Content / Containers, Dictionaries, and Layers
In This Topic
    Containers, Dictionaries, and Layers
    In This Topic

    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:

    using_PDFLayer1

    PDF Objects and Layers Diagram

    The following diagram shows interconnection between PDF objects and layers:

    using_PDFLayer2

    Visibility Policy

    A Dictionary Boolean property defines the visibility policy. It can be one of the following:

    • AllOn- equivalent to "AND" for all input parameters
    • AnyOn- equivalent to "OR" for all input parameters
    • AnyOff - equivalent to "NOT-OR" for all input parameters
    • AllOff - 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.