Foxit PDF SDK
com.foxit.sdk.pdf.actions.RenditionAction Class Reference
Inheritance diagram for com.foxit.sdk.pdf.actions.RenditionAction:
com.foxit.sdk.pdf.actions.Action com.foxit.sdk.common.Base

Public Member Functions

 RenditionAction (Action action)
 Constructor, with parent class object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
String getJavaScript () throws com.foxit.sdk.PDFException
 Get the JavaScript script to be executed. More...
 
int getOperationType () throws com.foxit.sdk.PDFException
 Get the operation type of current rendition action when being triggered. More...
 
Rendition getRendition (int index) throws com.foxit.sdk.PDFException
 Get a rendition by index. More...
 
int getRenditionCount () throws com.foxit.sdk.PDFException
 Get the count of rendition objects. More...
 
Screen getScreenAnnot () throws com.foxit.sdk.PDFException
 Get the related screen annotation. More...
 
void insertRendition (Rendition rendition, int index) throws com.foxit.sdk.PDFException
 Insert a rendition to current rendition action, at the position specified by index. More...
 
void removeRendition (Rendition rendition) throws com.foxit.sdk.PDFException
 Remove a rendition object from current rendition action. More...
 
void setJavaScript (String script) throws com.foxit.sdk.PDFException
 Set the JavaScript script to be executed. More...
 
void setOperationType (int op_type) throws com.foxit.sdk.PDFException
 Set the operation type of current rendition action when being triggered. More...
 
void setScreenAnnot (Screen screen_annot) throws com.foxit.sdk.PDFException
 Set related screen annotation. More...
 
- Public Member Functions inherited from com.foxit.sdk.pdf.actions.Action
 Action (PDFDoc document, PDFDictionary action_dict)
 Constructor, with parameters. More...
 
 Action (Action action)
 Constructor, with another action object. More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
PDFDictionary getDict () throws com.foxit.sdk.PDFException
 Get PDF dictionary of current object. More...
 
PDFDoc getDocument () throws com.foxit.sdk.PDFException
 Get the PDF document, to which current action belongs. More...
 
Action getSubAction (int index) throws com.foxit.sdk.PDFException
 Get a sub-action by index. More...
 
int getSubActionCount () throws com.foxit.sdk.PDFException
 Get the count of sub-actions. More...
 
int getType () throws com.foxit.sdk.PDFException
 Get action type. More...
 
void insertSubAction (int index, Action sub_action) throws com.foxit.sdk.PDFException
 Insert a new sub-action to the location specified by index. More...
 
boolean isEmpty ()
 Check whether current object is empty or not. More...
 
void removeAllSubActions () throws com.foxit.sdk.PDFException
 Remove all the sub-actions. More...
 
void removeSubAction (int index) throws com.foxit.sdk.PDFException
 Remove a sub-action, specified by index. More...
 
void setSubAction (int index, Action sub_action) throws com.foxit.sdk.PDFException
 Set a sub-action by index. More...
 
- Public Member Functions inherited from com.foxit.sdk.common.Base
synchronized void delete ()
 Clean up related resources immediately. More...
 

Static Public Attributes

static final int e_OpTypeAssociate = 0
 Associate rendition to related screen annotation. More...
 
static final int e_OpTypeNone = -1
 No operation is specified.
 
static final int e_OpTypePause = 2
 Pause any rendition being played in association with related screen annotation. If no rendition is being played, there is no effect.
 
static final int e_OpTypePlay = 4
 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.
 
static final int e_OpTypeResume = 3
 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.
 
static final int e_OpTypeStop = 1
 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.
 
- Static Public Attributes inherited from com.foxit.sdk.pdf.actions.Action
static final int e_NewWindowFlagFalse = 0
 "NewWindow" flag is false.
 
static final int e_NewWindowFlagNone = 2
 No "NewWindow" flag.
 
static final int e_NewWindowFlagTrue = 1
 "NewWindow" flag is true.
 
static final int e_TypeGoto = 1
 Action type: go-to action.
 
static final int e_TypeGoTo3DView = 18
 Action type: go-to-3D-view action.
 
static final int e_TypeGoToE = 3
 Action type: embedded go-to action.
 
static final int e_TypeGoToR = 2
 Action type: remote go-to action.
 
static final int e_TypeHide = 9
 Action type: hide action.
 
static final int e_TypeImportData = 13
 Action type: import-data action.
 
static final int e_TypeJavaScript = 14
 Action type: JavaScript action.
 
static final int e_TypeLaunch = 4
 Action type: launch action.
 
static final int e_TypeMovie = 8
 Action type: movie action.
 
static final int e_TypeNamed = 10
 Action type: named action.
 
static final int e_TypeRendition = 16
 Action type: rendition action.
 
static final int e_TypeResetForm = 12
 Action type: reset-form action.
 
static final int e_TypeSetOCGState = 15
 Action type: set-OCG-state action.
 
static final int e_TypeSound = 7
 Action type: sound action.
 
static final int e_TypeSubmitForm = 11
 Action type: submit-form action.
 
static final int e_TypeThread = 5
 Action type: thread action.
 
static final int e_TypeTrans = 17
 Action type: transition action.
 
static final int e_TypeUnknown = 0
 Action type: unknown action.
 
static final int e_TypeURI = 6
 Action type: uniform resource identifier (URI) action.
 

Additional Inherited Members

- Static Public Member Functions inherited from com.foxit.sdk.pdf.actions.Action
static Action create (PDFDoc document, int action_type) throws com.foxit.sdk.PDFException
 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 com.foxit.sdk.pdf.actions.RenditionAction is derived from Action and offers functions to get/set rendition action data.

See also
Action

Constructor & Destructor Documentation

◆ RenditionAction()

com.foxit.sdk.pdf.actions.RenditionAction.RenditionAction ( Action  action)

Constructor, with parent class object.

Parameters
[in]actionParent class object.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.pdf.actions.RenditionAction.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

◆ getJavaScript()

String com.foxit.sdk.pdf.actions.RenditionAction.getJavaScript ( ) throws com.foxit.sdk.PDFException

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

int com.foxit.sdk.pdf.actions.RenditionAction.getOperationType ( ) throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.actions.RenditionAction.e_OpTypeNone and this would be one of these values.

◆ getRendition()

Rendition com.foxit.sdk.pdf.actions.RenditionAction.getRendition ( int  index) throws com.foxit.sdk.PDFException

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 RenditionAction.getRenditionCount .
Returns
A rendition object.

◆ getRenditionCount()

int com.foxit.sdk.pdf.actions.RenditionAction.getRenditionCount ( ) throws com.foxit.sdk.PDFException

Get the count of rendition objects.

Returns
The count of rendition objects.

◆ getScreenAnnot()

Screen com.foxit.sdk.pdf.actions.RenditionAction.getScreenAnnot ( ) throws com.foxit.sdk.PDFException

Get the related screen annotation.

Returns
A screen annotation object.

◆ insertRendition()

void com.foxit.sdk.pdf.actions.RenditionAction.insertRendition ( Rendition  rendition,
int  index 
) throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.actions.RenditionAction.e_OpTypeAssociate or com.foxit.sdk.pdf.actions.RenditionAction.e_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 RenditionAction.getRenditionCount .
Returns
None.

◆ removeRendition()

void com.foxit.sdk.pdf.actions.RenditionAction.removeRendition ( Rendition  rendition) throws com.foxit.sdk.PDFException

Remove a rendition object from current rendition action.

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

◆ setJavaScript()

void com.foxit.sdk.pdf.actions.RenditionAction.setJavaScript ( String  script) throws com.foxit.sdk.PDFException

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

void com.foxit.sdk.pdf.actions.RenditionAction.setOperationType ( int  op_type) throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.actions.RenditionAction.e_OpTypeAssociate and this should be one of these values. If set value com.foxit.sdk.pdf.actions.RenditionAction.e_OpTypeNone , that means no operation type is specified.
Returns
None.

◆ setScreenAnnot()

void com.foxit.sdk.pdf.actions.RenditionAction.setScreenAnnot ( Screen  screen_annot) throws com.foxit.sdk.PDFException

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.

Member Data Documentation

◆ e_OpTypeAssociate

final int com.foxit.sdk.pdf.actions.RenditionAction.e_OpTypeAssociate = 0
static

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.