Foxit PDF SDK
fsdk.RenditionAction Class Reference

Public Member Functions

def GetJavaScript ()
 Get the JavaScript script to be executed. More...
 
def GetOperationType ()
 Get the operation type of current rendition action when being triggered. More...
 
def GetRendition (index)
 Get a rendition by index. More...
 
def GetRenditionCount ()
 Get the count of rendition objects. More...
 
def GetScreenAnnot ()
 Get the related screen annotation. More...
 
def InsertRendition (rendition, index)
 Insert a rendition to current rendition action, at the position specified by index. More...
 
def RemoveRendition (rendition)
 Remove a rendition object from current rendition action. More...
 
def SetJavaScript (script)
 Set the JavaScript script to be executed. More...
 
def SetOperationType (op_type)
 Set the operation type of current rendition action when being triggered. More...
 
def SetScreenAnnot (screen_annot)
 Set related screen annotation. 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 fsdk.RenditionAction is derived from Action and offers functions to get/set rendition action data.

See also
Action

Member Function Documentation

◆ GetJavaScript()

def fsdk.RenditionAction.GetJavaScript ( )

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()

def fsdk.RenditionAction.GetOperationType ( )

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 fsdk.RenditionActionE_OpTypeNone and this would be one of these values.

◆ GetRendition()

def fsdk.RenditionAction.GetRendition (   index)

Get a rendition by index.

Parameters
[in]indexIndex of rendition object to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.RenditionAction.GetRenditionCount .
Returns
A rendition object.

◆ GetRenditionCount()

def fsdk.RenditionAction.GetRenditionCount ( )

Get the count of rendition objects.

Returns
The count of rendition objects.

◆ GetScreenAnnot()

def fsdk.RenditionAction.GetScreenAnnot ( )

Get the related screen annotation.

Returns
A screen annotation object.

◆ InsertRendition()

def fsdk.RenditionAction.InsertRendition (   rendition,
  index 
)

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 fsdk.RenditionActionE_OpTypeAssociate or fsdk.RenditionActionE_OpTypeAssociate .

Parameters
[in]renditionA rendition object to be inserted.
[in]indexIndex 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 fsdk.RenditionAction.GetRenditionCount .
Returns
None.

◆ RemoveRendition()

def fsdk.RenditionAction.RemoveRendition (   rendition)

Remove a rendition object from current rendition action.

Parameters
[in]renditionA rendition object to be removed from current rendition action.
Returns
None.

◆ SetJavaScript()

def fsdk.RenditionAction.SetJavaScript (   script)

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]scriptA JavaScript script to be set.
Returns
None.

◆ SetOperationType()

def fsdk.RenditionAction.SetOperationType (   op_type)

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_typeOperation type. Please refer to values starting from fsdk.RenditionActionE_OpTypeAssociate and this should be one of these values. If set value fsdk.RenditionActionE_OpTypeNone , that means no operation type is specified.
Returns
None.

◆ SetScreenAnnot()

def fsdk.RenditionAction.SetScreenAnnot (   screen_annot)

Set related screen annotation.

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

Parameters
[in]screen_annotA screen annotation object to be set as related screen annotation.
Returns
None.