Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython2.SetOCGStateAction Class Reference
Inheritance diagram for FoxitPDFSDKPython2.SetOCGStateAction:

## Public Member Functions
def | SetOCGStateAction (action)
| Constructor, with parent class object. More...
def | GetOCGState (index)
| Get the state of OCG. More...
def | GetOCGStateArray (index)
| Get the OCG dictionary array. More...
def | GetOCGStateCount ()
| Get the count of OCG states. More...
def | InsertOCGStates (document, index, state, ocg_dict_array)
| Insert the OCG states to action. More...
def | IsRadioButtonStatePreserved ()
| Get the radio-button preserved state. More...
def | RemoveOCGStates (index)
| Remove the OCG state. More...
def | ReplaceOCGStates (document, index, ocg_dict_array)
| Replace the OCG states array. More...
def | SetRadioButtonStatePreserved (is_preserved)
| Set the radio-button preserved state. More...
Public Member Functions inherited from FoxitPDFSDKPython2.Action
def | Action (document, action_dict)
| Constructor, with parameters. More...
def | Action (action)
| Constructor, with another action object. More...
def | GetDict ()
| Get PDF dictionary of current object. More...
def | GetDocument ()
| Get the PDF document, to which current action belongs. More...
def | GetSubAction (index)
| Get a sub-action by index. More...
def | GetSubActionCount ()
| Get the count of sub-actions. More...
def | GetType ()
| Get action type. More...
def | InsertSubAction (index, sub_action)
| Insert a new sub-action to the location specified by index. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | RemoveAllSubActions ()
| Remove all the sub-actions. More...
def | RemoveSubAction (index)
| Remove a sub-action, specified by index. More...
def | SetSubAction (index, sub_action)
| Set a sub-action by index. More...

## Static Public Attributes
| e_OCGStateOff = _fsdk.SetOCGStateAction_e_OCGStateOff
| Sets the state of subsequent groups to OFF.
| e_OCGStateOn = _fsdk.SetOCGStateAction_e_OCGStateOn
| Sets the state of subsequent groups to ON.
| e_OCGStateToggle = _fsdk.SetOCGStateAction_e_OCGStateToggle
| Reverses the state of subsequent groups.
Static Public Attributes inherited from FoxitPDFSDKPython2.Action
| e_NewWindowFlagFalse = _fsdk.Action_e_NewWindowFlagFalse
| "NewWindow" flag is false.
| e_NewWindowFlagNone = _fsdk.Action_e_NewWindowFlagNone
| No "NewWindow" flag.
| e_NewWindowFlagTrue = _fsdk.Action_e_NewWindowFlagTrue
| "NewWindow" flag is true.
| e_TypeGoto = _fsdk.Action_e_TypeGoto
| Action type: go-to action.
| e_TypeGoTo3DView = _fsdk.Action_e_TypeGoTo3DView
| Action type: go-to-3D-view action.
| e_TypeGoToE = _fsdk.Action_e_TypeGoToE
| Action type: embedded go-to action.
| e_TypeGoToR = _fsdk.Action_e_TypeGoToR
| Action type: remote go-to action.
| e_TypeHide = _fsdk.Action_e_TypeHide
| Action type: hide action.
| e_TypeImportData = _fsdk.Action_e_TypeImportData
| Action type: import-data action.
| e_TypeJavaScript = _fsdk.Action_e_TypeJavaScript
| Action type: JavaScript action.
| e_TypeLaunch = _fsdk.Action_e_TypeLaunch
| Action type: launch action.
| e_TypeMovie = _fsdk.Action_e_TypeMovie
| Action type: movie action.
| e_TypeNamed = _fsdk.Action_e_TypeNamed
| Action type: named action.
| e_TypeRendition = _fsdk.Action_e_TypeRendition
| Action type: rendition action.
| e_TypeResetForm = _fsdk.Action_e_TypeResetForm
| Action type: reset-form action.
| e_TypeSetOCGState = _fsdk.Action_e_TypeSetOCGState
| Action type: set-OCG-state action.
| e_TypeSound = _fsdk.Action_e_TypeSound
| Action type: sound action.
| e_TypeSubmitForm = _fsdk.Action_e_TypeSubmitForm
| Action type: submit-form action.
| e_TypeThread = _fsdk.Action_e_TypeThread
| Action type: thread action.
| e_TypeTrans = _fsdk.Action_e_TypeTrans
| Action type: transition action.
| e_TypeUnknown = _fsdk.Action_e_TypeUnknown
| Action type: unknown action.
| e_TypeURI = _fsdk.Action_e_TypeURI
| Action type: uniform resource identifier (URI) action.

## Additional Inherited Members
Static Public Member Functions inherited from FoxitPDFSDKPython2.Action
def | Create (document, action_type)
| Create a new action, for specified action type. More...

## Detailed Description

Set-OCG-state action is to sets the state of one or more optional content groups. (For more details, please refer to <PDF Reference 1.7> P667 "Set- OCG-State Actions") Class FoxitPDFSDKPython2.SetOCGStateAction is derived from Action and offers functions to get/set set-OCG-state action data.

See also
  Action

## Constructor & Destructor Documentation

## ◆ SetOCGStateAction()

def FoxitPDFSDKPython2.SetOCGStateAction.SetOCGStateAction | ( |  | action | ) |

Constructor, with parent class object.

Parameters

  [in] | action | Parent class object.

## Member Function Documentation

## ◆ GetOCGState()

def FoxitPDFSDKPython2.SetOCGStateAction.GetOCGState | ( |  | index | ) |

Get the state of OCG.

Parameters

  [in] | index | The index of OCG state. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount .

Returns
  The state of OCG.

## ◆ GetOCGStateArray()

def FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateArray | ( |  | index | ) |

Get the OCG dictionary array.

Parameters

  [in] | index | The index of OCG state. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount .

Returns
  The OCG dictionary array.

## ◆ GetOCGStateCount()

def FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount | ( |  | ) |

Get the count of OCG states.

Returns
  The count of OCG states.

## ◆ InsertOCGStates()

def FoxitPDFSDKPython2.SetOCGStateAction.InsertOCGStates | ( |  | document,
|  |  | index,
|  |  | state,
|  |  | ocg_dict_array
| ) |  |

Insert the OCG states to action.

Parameters

  [in] | document | A valid PDF document object.
  [in] | index | The index of OCG want to insert. The OCG state will be inserted after the index. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount . If this is below 0 or count of OCG state in current action is 0, parameter state is to be inserted to the first position. If this is larger than count of OCG state in current action, parameter state is to be added to the end.
  [in] | state | The OCG state to insert.
  [in] | ocg_dict_array | The OCG dictionary array to insert.

Returns
  The index of the inserted OCG states.

## ◆ IsRadioButtonStatePreserved()

def FoxitPDFSDKPython2.SetOCGStateAction.IsRadioButtonStatePreserved | ( |  | ) |

Get the radio-button preserved state.

If true, indicates that radio-button state relationships between optional content groups should be preserved when the states in the State array are applied. If false, radio-button state relationships, if any, are ignored. Default value: true.

Returns
  The preserved state value.

## ◆ RemoveOCGStates()

def FoxitPDFSDKPython2.SetOCGStateAction.RemoveOCGStates | ( |  | index | ) |

Remove the OCG state.

Parameters

  [in] | index | The index of OCG to remove. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount .

Returns
  None.

## ◆ ReplaceOCGStates()

def FoxitPDFSDKPython2.SetOCGStateAction.ReplaceOCGStates | ( |  | document,
|  |  | index,
|  |  | ocg_dict_array
| ) |  |

Replace the OCG states array.

Parameters

  [in] | document | A valid PDF document object.
  [in] | index | The index of OCG want to replace. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.SetOCGStateAction.GetOCGStateCount .
  [in] | ocg_dict_array | The OCG dictionary array to insert.

Returns
  true means is success, while false means not.

## ◆ SetRadioButtonStatePreserved()

def FoxitPDFSDKPython2.SetOCGStateAction.SetRadioButtonStatePreserved | ( |  | is_preserved | ) |

Set the radio-button preserved state.

Parameters

  [in] | is_preserved | The preserved state value.

Returns
  None.