Group Class |
In the simplest case, the group's ON-OFF state makes the associated content visible or hidden. The ON-OFF state of a group can be toggled for a particular context (OCG::Context), and a set of states is kept in a configuration (OCG::Config). The visibility can depend on more than one group in an optional-content membership dictionary (OCG::OCMD), and can also be affected by the context's draw mode (OCGContext::OCDrawMode).
A group has an Intent entry, broadly describing the intended use. A group's content is considered to be optional (that is, the group's state is considered in its visibility) if any intent in its list matches an intent of the context. The intent list of the context is usually set from the intent list of the document configuration.
A Usage dictionary entry provides more specific intended usage information than an intent entry. Possible key values are: CreatorInfo, Language, Export, Zoom, Print, View, User, PageElement. The usage value can act as a kind of metadata, describing the sort of things that belong to the group, such as text in French, fine detail on a map, or a watermark. The usage values can also be used by the AutoState mechanism to make decisions about what groups should be on and what groups should be off. The AutoState mechanism considers the usage information in the OCGs, the AS Array of the configuration, and external factors; for example, the language the application is running in, the current zoom level on the page, or whether the page is being printed.
Namespace: pdftron.PDF.OCG
public sealed class Group
The Group type exposes the following members.
Name | Description | |
---|---|---|
Group | Creates a new optional-content group (OCG) object from an existing
SDF/Cos object.
|
Name | Description | |
---|---|---|
Create | Creates a new optional-content group (OCG) object in the document.
| |
Equals | (Inherited from Object.) | |
GetCurrentState | ||
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetInitialState | Gets the initial state.
| |
GetIntent | Gets the intent.
| |
GetName | Gets the name.
| |
GetSDFObj | Gets the SDFObj.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUsage | Gets the usage.
| |
HasUsage | Checks for usage.
| |
IsLocked | Checks if is locked.
| |
IsValid | Checks if is valid.
| |
SetCurrentState | ||
SetInitialState | Sets the initial state (ON or OFF) of the optional-content group (OCG)
object in a given configuration.
| |
SetIntent | Sets the Intent entry in an optional-content group's SDF/Cos dictionary.
For more information, see GetIntent().
| |
SetLocked | Sets the locked state of an OCG in a given configuration. The on/off state of a
locked OCG cannot be toggled by the user through the user interface.
| |
SetName | Sets the name of this optional-content group (OCG).
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |