Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.actions.RenditionAction Class Reference
Inheritance diagram for foxit.pdf.actions.RenditionAction:

## Public Types
enum | OperationType { OperationType.e_OpTypeNone = -1, OperationType.e_OpTypeAssociate = 0, OperationType.e_OpTypeStop = 1, OperationType.e_OpTypePause = 2, OperationType.e_OpTypeResume = 3, OperationType.e_OpTypePlay = 4 }
| Enumeration for operation type to perform when the rendition action is triggered. More...
Public Types inherited from foxit.pdf.actions.Action
enum | NewWindowFlag { NewWindowFlag.e_NewWindowFlagFalse = 0, NewWindowFlag.e_NewWindowFlagTrue = 1, NewWindowFlag.e_NewWindowFlagNone = 2 }
| Enumeration for new window flag. More...
enum | Type { Type.e_TypeUnknown = 0, Type.e_TypeGoto = 1, Type.e_TypeGoToR = 2, Type.e_TypeGoToE = 3, Type.e_TypeLaunch = 4, Type.e_TypeThread = 5, Type.e_TypeURI = 6, Type.e_TypeSound = 7, Type.e_TypeMovie = 8, Type.e_TypeHide = 9, Type.e_TypeNamed = 10, Type.e_TypeSubmitForm = 11, Type.e_TypeResetForm = 12, Type.e_TypeImportData = 13, Type.e_TypeJavaScript = 14, Type.e_TypeSetOCGState = 15, Type.e_TypeRendition = 16, Type.e_TypeTrans = 17, Type.e_TypeGoTo3DView = 18 }
| Enumeration for action type. More...

## Public Member Functions
| RenditionAction (Action action)
| Constructor, with parent class object. More...
string | GetJavaScript ()
| Get the JavaScript script to be executed. More...
RenditionAction.OperationType | GetOperationType ()
| Get the operation type of current rendition action when being triggered. More...
Rendition | GetRendition (int index)
| Get a rendition by index. More...
int | GetRenditionCount ()
| Get the count of rendition objects. More...
Screen | GetScreenAnnot ()
| Get the related screen annotation. More...
void | InsertRendition (Rendition rendition, int index)
| Insert a rendition to current rendition action, at the position specified by index. More...
void | RemoveRendition (Rendition rendition)
| Remove a rendition object from current rendition action. More...
void | SetJavaScript (string script)
| Set the JavaScript script to be executed. More...
void | SetOperationType (RenditionAction.OperationType op_type)
| Set the operation type of current rendition action when being triggered. More...
void | SetScreenAnnot (Screen screen_annot)
| Set related screen annotation. More...
Public Member Functions inherited from foxit.pdf.actions.Action
| Action (PDFDoc document, PDFDictionary action_dict)
| Constructor, with parameters. More...
| Action (Action action)
| Constructor, with another action object. More...
PDFDictionary | GetDict ()
| Get PDF dictionary of current object. More...
PDFDoc | GetDocument ()
| Get the PDF document, to which current action belongs. More...
Action | GetSubAction (int index)
| Get a sub-action by index. More...
int | GetSubActionCount ()
| Get the count of sub-actions. More...
Action.Type | GetType ()
| Get action type. More...
void | InsertSubAction (int index, Action sub_action)
| Insert a new sub-action to the location specified by index. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...
void | RemoveAllSubActions ()
| Remove all the sub-actions. More...
void | RemoveSubAction (int index)
| Remove a sub-action, specified by index. More...
void | SetSubAction (int index, Action sub_action)
| Set a sub-action by index. More...

## Additional Inherited Members
Static Public Member Functions inherited from foxit.pdf.actions.Action
static Action | Create (PDFDoc document, Action.Type action_type)
| Create a new action, for specified action type. More...

## Detailed Description

Rendition action is to control the playing of multimedia content. (For more details, please refer to <PDF Reference 1.7> P668 "Rendition Actions") Class foxit.pdf.actions.RenditionAction is derived from Action and offers functions to get/set rendition action data.

See also
  Action

## Member Enumeration Documentation

## ◆ OperationType

enum foxit.pdf.actions.RenditionAction.OperationType
| strong

Enumeration for operation type to perform when the rendition action is triggered.

Values of this enumeration should be used alone.

Enumerator
e_OpTypeNone | No operation is specified.
e_OpTypeAssociate | Associate rendition to related screen annotation. If no rendition is associated with related screen annotation, play rendition (which is specified in rendition action), associating it with the annotation. If a rendition is already associated with related screen annotation, it is stopped, and the new rendition (which is specified in rendition action) is associated with the annotation.
e_OpTypeStop | Stop any rendition being played in association with related screen annotation and remove the association. If no rendition is being played, there is no effect.
e_OpTypePause | Pause any rendition being played in association with related screen annotation. If no rendition is being played, there is no effect.
e_OpTypeResume | Resume any rendition being played in association with related screen annotation. If no rendition is being played or the rendition is not paused, there is no effect.
e_OpTypePlay | Play rendition (which is specified in rendition action), associating it with related screen annotation. If a rendition is already associated with the annotation, resume that rendition if it is paused; otherwise, do nothing.

## Constructor & Destructor Documentation

## ◆ RenditionAction()

foxit.pdf.actions.RenditionAction.RenditionAction | ( | Action | action | ) |
| inline

Constructor, with parent class object.

Parameters

  [in] | action | Parent class object.

## Member Function Documentation

## ◆ GetJavaScript()

string foxit.pdf.actions.RenditionAction.GetJavaScript | ( |  | ) |
| inline

Get the JavaScript script to be executed.

As a useful rendition action, it should contain a JavaScript script to be executed or is specified an operation type to be performed when triggered. If both JavaScript script and operation type exist, application should execute JavaScript; if application is unable to execute JavaScript script, then perform as operation type defines. If no JavaScript script and operation type is invalid, that means the action is invalid.

Returns
  A JavaScript script.

## ◆ GetOperationType()

RenditionAction.OperationType foxit.pdf.actions.RenditionAction.GetOperationType | ( |  | ) |
| inline

Get the operation type of current rendition action when being triggered.

As a useful rendition action, it should contain a JavaScript script to be executed or is specified an operation type to be performed when triggered. If both JavaScript script and operation type exist, application should execute JavaScript; if application is unable to execute JavaScript script, then perform as operation type defines. If no JavaScript script and operation type is invalid, that means the action is invalid.

Returns
  Operation type. Please refer to values starting from foxit.pdf.actions.RenditionAction.OperationType.e_OpTypeNone and this would be one of these values.

## ◆ GetRendition()

Rendition foxit.pdf.actions.RenditionAction.GetRendition | ( | int | index | ) |
| inline

Get a rendition by index.

Parameters

  [in] | index | Index of rendition object to be retrieved. Valid range: from 0 to (count-1). count is returned by function RenditionAction.GetRenditionCount .

Returns
  A rendition object.

## ◆ GetRenditionCount()

int foxit.pdf.actions.RenditionAction.GetRenditionCount | ( |  | ) |
| inline

Get the count of rendition objects.

Returns
  The count of rendition objects.

## ◆ GetScreenAnnot()

Screen foxit.pdf.actions.RenditionAction.GetScreenAnnot | ( |  | ) |
| inline

Get the related screen annotation.

Returns
  A screen annotation object.

## ◆ InsertRendition()

void foxit.pdf.actions.RenditionAction.InsertRendition | ( | Rendition | rendition,
|  | int | index
| ) |  |
| inline

Insert a rendition to current rendition action, at the position specified by index.

Rendition object is necessary for a rendition action when operation type is foxit.pdf.actions.RenditionAction.OperationType.e_OpTypeAssociate or foxit.pdf.actions.RenditionAction.OperationType.e_OpTypeAssociate .

Parameters

  [in] | rendition | A rendition object to be inserted.
  [in] | index | Index that specifies where to insert the rendition object. If index is below 0 or bigger than (count-1), the input rendition will be inserted to be the end. count is returned by function RenditionAction.GetRenditionCount .

Returns
  None.

## ◆ RemoveRendition()

void foxit.pdf.actions.RenditionAction.RemoveRendition | ( | Rendition | rendition | ) |
| inline

Remove a rendition object from current rendition action.

Parameters

  [in] | rendition | A rendition object to be removed from current rendition action.

Returns
  None.

## ◆ SetJavaScript()

void foxit.pdf.actions.RenditionAction.SetJavaScript | ( | string | script | ) |
| inline

Set the JavaScript script to be executed.

As a useful rendition action, it should contain a JavaScript script to be executed or is specified an operation type to be performed when triggered. If both JavaScript script and operation type exist, application should execute JavaScript; if application is unable to execute JavaScript script, then perform as operation type defines. If no JavaScript script and operation type is invalid, that means the action is invalid.

Parameters

  [in] | script | A JavaScript script to be set.

Returns
  None.

## ◆ SetOperationType()

void foxit.pdf.actions.RenditionAction.SetOperationType | ( | RenditionAction.OperationType | op_type | ) |
| inline

Set the operation type of current rendition action when being triggered.

As a useful rendition action, it should contain a JavaScript script to be executed or is specified an operation type to be performed when triggered. If both JavaScript script and operation type exist, application should execute JavaScript; if application is unable to execute JavaScript script, then perform as operation type defines. If no JavaScript script and operation type is invalid, that means the action is invalid.

Parameters

  [in] | op_type | Operation type. Please refer to values starting from foxit.pdf.actions.RenditionAction.OperationType.e_OpTypeAssociate and this should be one of these values. If set value foxit.pdf.actions.RenditionAction.OperationType.e_OpTypeNone , that means no operation type is specified.

Returns
  None.

## ◆ SetScreenAnnot()

void foxit.pdf.actions.RenditionAction.SetScreenAnnot | ( | Screen | screen_annot | ) |
| inline

Set related screen annotation.

This property is necessary when operation type is set with valid value.

Parameters

  [in] | screen_annot | A screen annotation object to be set as related screen annotation.

Returns
  None.