Class Index

Classes


Class PDFNet.OCG

PDFNet.OCG

Class Summary
Constructor Attributes Constructor Name and Description
 
optional-content group
Method Summary
Method Attributes Method Name and Description
 
copy()
Copy Constructor
<static>  
PDFNet.OCG.create(pdfdoc, name)
Constructor
<static>  
PDFNet.OCG.createFromObj(ocg_dict)
[Documentation Not Yet Added]
 
 
 
 
 
 
getUsage(key)
 
 
isLocked(cfg)
 
 
setCurrentState(ctx, state)
sets the current ON-OFF state of the optional-content group (OCG) object in a given context.
 
setInitialState(cfg, state)
sets the initial state (ON or OFF) of the optional-content group (OCG) object in a given configuration.
 
setIntent(value)
Sets the Intent entry in an optional-content group's SDF/Cos dictionary.
 
setLocked(cfg, state)
Sets the locked state of an OCG in a given configuration.
 
setName(value)
sets the name of this optional-content group (OCG).
Class Detail
PDFNet.OCG(id)
optional-content group
Parameters:
id
Method Detail
{OCG} copy()
Copy Constructor
Returns:
{OCG} A promise that resolves to an object of type: "OCG" (generated documentation)

<static> {OCG} PDFNet.OCG.create(pdfdoc, name)
Constructor
Parameters:
{PDFDoc} pdfdoc
(generated documentation)
{string} name
(generated documentation)
Returns:
{OCG} A promise that resolves to an object of type: "OCG" (generated documentation)

<static> {OCG} PDFNet.OCG.createFromObj(ocg_dict)
[Documentation Not Yet Added]
Parameters:
{Obj} ocg_dict
(generated documentation)
Returns:
{OCG} A promise that resolves to an object of type: "OCG" (generated documentation)

{boolean} getCurrentState(ctx)
Parameters:
{OCGContext} ctx
The context for which to get the group's state.
Returns:
{boolean} A promise that resolves to true if this OCG object is in the ON state in a given context, false otherwise.

{boolean} getInitialState(cfg)
Parameters:
{OCGConfig} cfg
The configuration for which to get the group's initial state.
Returns:
{boolean} A promise that resolves to the initial state (ON or OFF) of the optional-content group (OCG) object in a given configuration.

{Obj} getIntent()
Returns:
{Obj} A promise that resolves to oCG intent. An intent is a name object (or an array of name objects) broadly describing the intended use, which can be either "View" or "Design". 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.

{string} getName()
Returns:
{string} A promise that resolves to the name of this optional-content group (OCG).

{Obj} getSDFObj()
Returns:
{Obj} A promise that resolves to pointer to the underlying SDF/Cos object.

{Obj} getUsage(key)
Parameters:
{string} key
The usage key in the usage dictionary entry. The possible key values are: CreatorInfo, Language, Export, Zoom, Print, View, User, PageElement.
Returns:
{Obj} A promise that resolves to the usage information associated with the given key in the Usage dictionary for the group, or a NULL if the entry is not present. A Usage dictionary entry provides more specific intended usage information than an intent entry.

{boolean} hasUsage()
Returns:
{boolean} A promise that resolves to true if this group is associated with a Usage dictionary, false otherwise.

{boolean} isLocked(cfg)
Parameters:
{OCGConfig} cfg
The OC configuration.
Returns:
{boolean} A promise that resolves to true if this OCG is locked in a given configuration, false otherwise. The on/off state of a locked OCG cannot be toggled by the user through the user interface.

{boolean} isValid()
Returns:
{boolean} A promise that resolves to true if this is a valid (non-null) OCG, false otherwise.

setCurrentState(ctx, state)
sets the current ON-OFF state of the optional-content group (OCG) object in a given context.
Parameters:
{OCGContext} ctx
The context for which to set the group's state.
{boolean} state
The new state.

setInitialState(cfg, state)
sets the initial state (ON or OFF) of the optional-content group (OCG) object in a given configuration.
Parameters:
{OCGConfig} cfg
The configuration for which to set the group's initial state.
{boolean} state
The new initial state, true if the state is ON, false if it is OFF.

setIntent(value)
Sets the Intent entry in an optional-content group's SDF/Cos dictionary. For more information, see GetIntent().
Parameters:
{Obj} value
The new Intent entry value (a name object or an array of name objects).

setLocked(cfg, state)
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.
Parameters:
{OCGConfig} cfg
IN/OUT The optional-content configuration.
{boolean} state
true if the OCG should be locked, false otherwise.

setName(value)
sets the name of this optional-content group (OCG).
Parameters:
{string} value
The new name.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:40 GMT-0700 (PDT)