OptionalContentConfig Class Documentation
classOptionalContentConfigNamespace:com::datalogics::PDFL
Detailed Description
A structure used to store data related to layers in a PDF. The Optional Content Configuration Structure is used to maintain a set of visibility states and other optional values related to layers, or Optional Content Groups, within a PDF file.
These configuration values are stored for future use.
The default configuration for a PDF document is stored in the D entry in the Optional Content Properties dictionary.
An Optional Content Group, or layer, is a set of graphic images that can be made visible or invisible within a PDF file, and the Optional Content Configuration Structure is typically used to set the initial value for these images-On or Off, visible or invisible.
Referenced by
Constructor & Destructor Documentation
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voidfinalize
voidfinalize()Returns:
voidgetBaseState
OptionalContentBaseStategetBaseState()Returns:
The base state that will be applied to OptionalContentGroups.Get the base state for this OptionalContentConfig. When this config is applied to an OptionalContentContext, all OptionalContentGroups will be set to according to this base state:
If BaseState is set to BaseStateOff, when this OptionalContentConfig is applied to an OptionalContentContext:
All OptionalContentGroups in the document are set to OFF, and
Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on.
All OptionalContentGroups in the document are set to OFF, and
Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on.
If BaseState is set to BaseStateOn, when this OptionalContentConfig is applied to an OptionalContentContext:
All OptionalContentGroups in the document are set to ON, and
Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off.
All OptionalContentGroups in the document are set to ON, and
Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off.
If BaseState is set to BaseStateUnchanged, when this OptionalContentConfig is applied to an OptionalContentContext:
Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on
Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off
Any OptionalContentGroups in neither the ON or OFF array are unaffected
Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on
Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off
Any OptionalContentGroups in neither the ON or OFF array are unaffected
getIntent
java.util.List< String >getIntent()Returns:
An array containing intent strings.Gets the intent list for an OptionalContentConfig. An intent is a string value broadly describing the intended use, either View or Design.
A config's intent is used to set the intent of an OptionalContentContext when this config is applied to the context.
getName
StringgetName()Returns:
The name of this OptionalContentConfig. Use null to remove the name.Get the name of the OptionalContentConfig
getOffArray
java.util.List< OptionalContentGroup >getOffArray()Returns:
A list of all OptionalContentGroups in the OFF arrayGet the list of OptionalContentGroups in the OFF array.
When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to OFF.
This list is ignored if the BaseState is BaseStateOff; please see the description of the BaseState property for details.
Note that an OptionalContentGroup should not be in both the ON array and the OFF array.
getOnArray
java.util.List< OptionalContentGroup >getOnArray()Returns:
A list of all OptionalContentGroups in the ON arrayGet the list of OptionalContentGroups in the ON array.
When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to ON.
This list is ignored if the BaseState is BaseStateOn; please see the description of the BaseState property for details.
Note that an OptionalContentGroup should not be in both the ON array and the OFF array.
getOrder
OptionalContentOrderArraygetOrder()Returns:
The OptionalContentOrderArray for optional content in this optional content config.Gets the order list for the optional content in this optional content config.
Note that you can set the Title property on this order list, just as on any other OptionalContentOrderArray, and it will save as a legal PDF. However, the Title property on the top level order array simply appears as an extraneous text label in a PDF Viewer Layers panel, so its use at this level is typically not required.
getPDFDict
PDFDictgetPDFDict()Returns:
PDFDictRetrieve the PDFObject representation of this object
setBaseState
voidsetBaseState(OptionalContentBaseStatebaseState)Parameters
baseState: OptionalContentBaseStateThe base state that will be applied to OptionalContentGroups.
Returns:
voidSet the base state for this OptionalContentConfig. When this config is applied to an OptionalContentContext, all OptionalContentGroups will be set to according to this base state:
If BaseState is set to BaseStateOff, when this OptionalContentConfig is applied to an OptionalContentContext:
All OptionalContentGroups in the document are set to OFF, and
Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on.
All OptionalContentGroups in the document are set to OFF, and
Any OptionalContentGroups in this OptionalContentConfig's ON array are then set to on.
If BaseState is set to BaseStateOn, when this OptionalContentConfig is applied to an OptionalContentContext:
All OptionalContentGroups in the document are set to ON, and
Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off.
All OptionalContentGroups in the document are set to ON, and
Any OptionalContentGroups in this OptionalContentConfig's OFF array are then set to off.
If BaseState is set to BaseStateUnchanged, when this OptionalContentConfig is applied to an OptionalContentContext:
Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on
Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off
Any OptionalContentGroups in neither the ON or OFF array are unaffected
Any OptionalContentGroups in this OptionalContentConfig's ON array are set to on
Any OptionalContentGroups in this OptionalContentConfig's OFF array are set to off
Any OptionalContentGroups in neither the ON or OFF array are unaffected
setIntent
voidsetIntent(java.util.List< String >intents)Parameters
intents: java.util.List< String >
Returns:
voidSets the intent list for an OptionalContentConfig. An intent is a string value broadly describing the intended use, either View or Design.
A config's intent is used to set the intent of an OptionalContentContext when this config is applied to the context.
setName
voidsetName(Stringname)Parameters
name: StringThe name of this OptionalContentConfig. Use null to remove the name.
Returns:
voidSet the name of the optional content group
setOffArray
voidsetOffArray(java.util.List< OptionalContentGroup >ocgs)Parameters
ocgs: java.util.List< OptionalContentGroup >A list of all OptionalContentGroups to be placed in the OFF array
Returns:
voidSet the list of OptionalContentGroups in the OFF array.
When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to OFF.
This list is ignored if the BaseState is BaseStateOff; please see the description of the BaseState property for details.
Note that an OptionalContentGroup should not be in both the ON array and the OFF array.
setOnArray
voidsetOnArray(java.util.List< OptionalContentGroup >ocgs)Parameters
ocgs: java.util.List< OptionalContentGroup >A list of all OptionalContentGroups to be placed in the ON array
Returns:
voidSet the list of OptionalContentGroups in the ON array.
When this config is applied to an OptionalContentContext, the OptionalContentGroups in this array will be set to ON.
This list is ignored if the BaseState is BaseStateOn; please see the description of the BaseState property for details.
Note that an OptionalContentGroup should not be in both the ON array and the OFF array.