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

Public Member Functions

 Rendition (PDFDoc pdf_doc, PDFDictionary rendition_dict) throws com.foxit.sdk.PDFException
 Constructor, with parameters.
More...
 
 Rendition (Rendition other)
 Constructor, with another rendition object.
More...
 
int addMediaPlayer (int type, MediaPlayer player) throws com.foxit.sdk.PDFException
 Add a media player object for specified type.
More...
 
synchronized void delete ()
 Clean up related resources immediately. More...
 
void enableAutoPlay (boolean is_auto_play, int opt_type) throws com.foxit.sdk.PDFException
 Set the flag to decide whether the media should automatically play when activated.
More...
 
void enableControlBarVisible (boolean is_visible, int opt_type) throws com.foxit.sdk.PDFException
 Set the control bar visibility flag.
More...
 
void enableFloatingWindowCloseButton (boolean is_visible, int opt_type) throws com.foxit.sdk.PDFException
 Set the flag to specify if the floating window should include user interface elements that allow a user to close a floating window.
More...
 
void enableFloatingWindowTitleBar (boolean is_visible, int opt_type) throws com.foxit.sdk.PDFException
 Set flag to specify if the floating window should have a title bar.
More...
 
long getBackgroundColor () throws com.foxit.sdk.PDFException
 Get the background color for the rectangle in which the media is being played.
More...
 
float getBackgroundOpacity () throws com.foxit.sdk.PDFException
 Get the background opacity. (ignored for full-screen and hidden windows)
More...
 
PDFDictionary getDict () throws com.foxit.sdk.PDFException
 Get PDF dictionary of current object.
More...
 
int getDuration () throws com.foxit.sdk.PDFException
 Get the intrinsic duration.
More...
 
int getFitStyle () throws com.foxit.sdk.PDFException
 Get the fit style.
More...
 
int getFloatingWindowHeight () throws com.foxit.sdk.PDFException
 Get the height of floating window, in pixels.
More...
 
int getFloatingWindowOffscreenEvent () throws com.foxit.sdk.PDFException
 Get the event type which specifies what should occur if the floating window is positioned totally or partially offscreen (that is, not visible on any physical monitor).
More...
 
int getFloatingWindowPosition () throws com.foxit.sdk.PDFException
 Get the position where floating window should be positioned to the related window.
More...
 
int getFloatingWindowRelatedWindowType () throws com.foxit.sdk.PDFException
 Get the window relative type.
More...
 
int getFloatingWindowResizeType () throws com.foxit.sdk.PDFException
 Get the resize type which specifies whether the floating window may be resized by a user.
More...
 
WStringArray getFloatingWindowTitles () throws com.foxit.sdk.PDFException
 Get the multi-language text array which provides text to display on the floating window's title bar.
More...
 
int getFloatingWindowWidth () throws com.foxit.sdk.PDFException
 Get the width of floating window, in pixels.
More...
 
String getMediaBaseURL () throws com.foxit.sdk.PDFException
 Get the base URL.
More...
 
String getMediaClipContentType () throws com.foxit.sdk.PDFException
 Get the content type (MIME type) of the media data.
More...
 
FileSpec getMediaClipFile () throws com.foxit.sdk.PDFException
 Get the file specification of the actual media data.
More...
 
String getMediaClipName () throws com.foxit.sdk.PDFException
 Get the name of the media clip, for use in user interface.
More...
 
WStringArray getMediaDescriptions () throws com.foxit.sdk.PDFException
 Get the multi-language text array that provides alternate text descriptions for the media clip data in case it cannot be played.
More...
 
MediaPlayer getMediaPlayer (int type, int index) throws com.foxit.sdk.PDFException
 Get a media player object by index for specified type.
More...
 
int getMediaPlayerCount (int type) throws com.foxit.sdk.PDFException
 Get the count of media player objects for specified type.
More...
 
int getMonitorSpecifier () throws com.foxit.sdk.PDFException
 Get the monitor specifier type value.
More...
 
int getPermission () throws com.foxit.sdk.PDFException
 Get the media permission.
More...
 
String getRenditionName () throws com.foxit.sdk.PDFException
 Get the name.
More...
 
int getRepeatCount () throws com.foxit.sdk.PDFException
 Get the repeat count, similar to SMIL's repeatCount attribute.
More...
 
int getVolume () throws com.foxit.sdk.PDFException
 Get the volume that specifies the desired volume level as a percentage of recorded volume level.
More...
 
int getWindowType () throws com.foxit.sdk.PDFException
 Get the type of window that the media should play in.
More...
 
boolean hasFloatingWindowCloseButton () throws com.foxit.sdk.PDFException
 Check if the floating window should include user interface elements that allow a user to close a floating window.
More...
 
boolean hasFloatingWindowTitleBar () throws com.foxit.sdk.PDFException
 Check if the floating window should have a title bar.
More...
 
boolean hasMediaClip () throws com.foxit.sdk.PDFException
 Check if current rendition object contains a media clip.
More...
 
boolean isAutoPlay () throws com.foxit.sdk.PDFException
 Check whether the media should automatically play when activated.
More...
 
boolean isControlBarVisible () throws com.foxit.sdk.PDFException
 Check whether to display a player-specific controller user interface (for example, play/pause/stop controls) when playing.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 
void removeMediaPlayer (int type, MediaPlayer player) throws com.foxit.sdk.PDFException
 Remove a media player object for specified type.
More...
 
void setBackgroundColor (long color, int opt_type) throws com.foxit.sdk.PDFException
 Set the background color for the rectangle in which the media is being played.
More...
 
void setBackgroundOpacity (float opacity, int opt_type) throws com.foxit.sdk.PDFException
 Set the background opacity. (ignored for full-screen and hidden windows)
More...
 
void setDuration (int duration, int opt_type) throws com.foxit.sdk.PDFException
 Set the intrinsic duration.
More...
 
void setFitStyle (int fit_style, int opt_type) throws com.foxit.sdk.PDFException
 Set the fit style.
More...
 
void setFloatingWindowOffscreenEvent (int offscreen_event, int opt_type) throws com.foxit.sdk.PDFException
 Set the event type which specifies what should occur if the floating window is positioned totally or partially offscreen (that is, not visible on any physical monitor).
More...
 
void setFloatingWindowPosition (int position, int opt_type) throws com.foxit.sdk.PDFException
 Set the position where floating window should be positioned to the related window.
More...
 
void setFloatingWindowRelatedWindowType (int window_type, int opt_type) throws com.foxit.sdk.PDFException
 Set the window relative type.
More...
 
void setFloatingWindowResizeType (int resize_type, int opt_type) throws com.foxit.sdk.PDFException
 Set the resize type which specifies whether the floating window may be resized by a user.
More...
 
void setFloatingWindowSize (int width, int height, int opt_type) throws com.foxit.sdk.PDFException
 Set the size of floating window, in pixels.
More...
 
void setFloatingWindowTitles (WStringArray titles, int opt_type) throws com.foxit.sdk.PDFException
 Set the multi-language text array which provides text to display on the floating window's title bar.
More...
 
void setMediaBaseURL (String base_url, int opt_type) throws com.foxit.sdk.PDFException
 Set the base URL.
More...
 
void setMediaClipContentType (String content_type) throws com.foxit.sdk.PDFException
 Set the content type (MIME type) of the media data.
More...
 
void setMediaClipFile (FileSpec file_specification) throws com.foxit.sdk.PDFException
 Set the file specification of the actual media data.
More...
 
void setMediaClipName (String name) throws com.foxit.sdk.PDFException
 Set the name of the media clip, for use in user interface.
More...
 
void setMediaDescriptions (WStringArray description_array) throws com.foxit.sdk.PDFException
 Set the multi-language text array that provides alternate text descriptions for the media clip data in case it cannot be played.
More...
 
void setMonitorSpecifier (int monitor_specifier, int opt_type) throws com.foxit.sdk.PDFException
 Set the monitor specifier type value.
More...
 
void setPermission (int permission) throws com.foxit.sdk.PDFException
 Set the media permission.
More...
 
void setRenditionName (String name) throws com.foxit.sdk.PDFException
 Get the name.
More...
 
void setRepeatCount (int count, int opt_type) throws com.foxit.sdk.PDFException
 Set the repeat count, similar to SMIL's repeatCount attribute.
More...
 
void setVolume (int volume, int opt_type) throws com.foxit.sdk.PDFException
 Set the volume that specifies the desired volume level as a percentage of recorded volume level.
More...
 
void setWindowType (int window_type, int opt_type) throws com.foxit.sdk.PDFException
 Set the type of window that the media should play in.
More...
 

Static Public Attributes

static final int e_FloatingWindowOffscreenEventMoveResize = 1
 Move or resize.

 
static final int e_FloatingWindowOffscreenEventNone = 0
 Nothing.

 
static final int e_FloatingWindowOffscreenEventNonViable = 2
 Consider the object non-viable.

 
static final int e_FloatingWindowRelatedWindowApplication = 1
 The application window.

 
static final int e_FloatingWindowRelatedWindowDocument = 0
 The document window.

 
static final int e_FloatingWindowRelatedWindowFullDesktop = 2
 The full virtual desktop.

 
static final int e_FloatingWindowRelatedWindowMonitor = 3
 Depends on monitor specifier.

 
static final int e_FloatingWindowResizeTypeAnyway = 2
 May be resized without preserving aspect ratio.

 
static final int e_FloatingWindowResizeTypeAspectRatio = 1
 May be resized only if aspect ratio is preserved.

 
static final int e_FloatingWindowResizeTypeNo = 0
 May not be resized.

 
static final int e_MediaOptionBestEffort = 1
 Options defined in this type need only be honored in a "best effort" sense.

 
static final int e_MediaOptionMustBeHonored = 0
 Options defined in this type must be honored for rendition object to be considered viable.

 
static final int e_MediaPermTempAccess = 2
 Allowed only if the document permissions allow content extraction, including for accessibility purposes.

 
static final int e_MediaPermTempAlways = 3
 Always allowed.

 
static final int e_MediaPermTempExtract = 1
 Allowed only if the document permissions allow content extraction.

 
static final int e_MediaPermTempNever = 0
 Never allowed.

 
static final int e_MediaPlayerAvailable = 1
 Any of players in this type may be used in playing the associated media clip.

 
static final int e_MediaPlayerFitStyleDefault = 5
 Use the player's default setting (author has no preference).

 
static final int e_MediaPlayerFitStyleFill = 2
 The media's width and height are scaled independently so that the media and play rectangles are the same; the aspect ratio is not necessarily preserved. Same as "fill" value of SMIL's fit attribute.

 
static final int e_MediaPlayerFitStyleHidden = 4
 The media is not scaled. Only the portions of the media rectangle that intersect the play rectangle are displayed. Same as "hidden" value of SMIL's fit attribute.

 
static final int e_MediaPlayerFitStyleMeet = 0
 The media's width and height are scaled while preserving the aspect ratio so that the media and play rectangles have the greatest possible intersection while still displaying all media content. Same as "meet" value of SMIL's fit attribute.

 
static final int e_MediaPlayerFitStyleScroll = 3
 The media is not scaled. A scrolling user interface is provided if the media rectangle is wider or taller than the play rectangle. Same as "scroll" value of SMIL's fit attribute.

 
static final int e_MediaPlayerFitStyleSlice = 1
 The media's width and height are scaled while preserving the aspect ratio so that the play rectangle is entirely filled, and the amount of media content that does not fit within the play rectangle is minimized. Same as "slice" value of SMIL's fit attribute.

 
static final int e_MediaPlayerMustUsed = 0
 One of players in this type must be used in playing the associated media clip.

 
static final int e_MediaPlayerNotUsed = 2
 Players in this type must not be used in playing the associated media clip.

 
static final int e_MonitorSpecifierGreatestArea = 4
 Monitor with the greatest area (in pixels squared)

 
static final int e_MonitorSpecifierGreatestColorDepth = 3
 Monitor with the greatest color depth.

 
static final int e_MonitorSpecifierGreatestHeight = 5
 Monitor with the greatest height (in pixels)

 
static final int e_MonitorSpecifierGreatestWidth = 6
 Monitor with the greatest width (in pixels)

 
static final int e_MonitorSpecifierLargest = 0
 The monitor that contains the largest section of the document window.

 
static final int e_MonitorSpecifierPrimary = 2
 Primary monitor. If no monitor is considered primary, use case 0.

 
static final int e_MonitorSpecifierSmallest = 1
 The monitor that contains the smallest section of the document window.

 
static final int e_WindowTypeAnnotRect = 3
 Window type: the rectangle occupied by the screen annotation which is associated with the rendition object.

 
static final int e_WindowTypeFloating = 0
 Window type: a floating window.

 
static final int e_WindowTypeFullScreen = 1
 Window type: a full-screen window that obscures all other windows.

 
static final int e_WindowTypeHidden = 2
 Window type: a hidden window.

 

Detailed Description

Rendition object is used as a media object that specifies what to play, how to play it and where to play it. (For more details, please refer to <PDF Reference 1.7> P758 Section "9.1.2 Renditions", P762 "Media Renditions")

Constructor & Destructor Documentation

◆ Rendition() [1/2]

com.foxit.sdk.pdf.Rendition.Rendition ( PDFDoc  pdf_doc,
PDFDictionary  rendition_dict 
) throws com.foxit.sdk.PDFException

Constructor, with parameters.

Parameters
[in]pdf_docA valid PDF document object.
[in]rendition_dictThe PDF dictionary for a rendition object in PDF document represented by parameter pdf_doc. If this is null that means to construct a new rendition object in PDF document represented by parameter pdf_obj.

◆ Rendition() [2/2]

com.foxit.sdk.pdf.Rendition.Rendition ( Rendition  other)

Constructor, with another rendition object.

Parameters
[in]otherAnother rendition object.

Member Function Documentation

◆ addMediaPlayer()

int com.foxit.sdk.pdf.Rendition.addMediaPlayer ( int  type,
MediaPlayer  player 
) throws com.foxit.sdk.PDFException

Add a media player object for specified type.

Usually, a media player object should be only be added to a rendition object with specified media player type. User is not recommended to add the same media player object to different renditions or different media player types of one rendition; otherwise unexpected issues (such as crash) may occur later. If user does not want to construct another media player and set same values, user can clone the dictionary of original media player object and use the cloned dictionary to construct another media player directly.

Parameters
[in]typeMedia player type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerMustUsed and this should be one of these values.
[in]playerA media player object to be added for specified type. If the media player has existed for specified type, this function will return the index of the media player.
Returns
Index of the input media player.

◆ delete()

synchronized void com.foxit.sdk.pdf.Rendition.delete ( )

Clean up related resources immediately.

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

Reimplemented from com.foxit.sdk.common.Base.

◆ enableAutoPlay()

void com.foxit.sdk.pdf.Rendition.enableAutoPlay ( boolean  is_auto_play,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the flag to decide whether the media should automatically play when activated.

Parameters
[in]is_auto_playtrue means the media should automatically play when activated, while false means the media should be initially paused when activated (for example, the first frame is displayed). Relevant only for media that may be paused.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ enableControlBarVisible()

void com.foxit.sdk.pdf.Rendition.enableControlBarVisible ( boolean  is_visible,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the control bar visibility flag.

Control bar visibility flag is used to decide whether to display a player-specific controller user interface (for example, play/pause/stop controls) when playing.

Parameters
[in]is_visibletrue means to display a player-specific controller user interface, while false means not to display such user interface.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ enableFloatingWindowCloseButton()

void com.foxit.sdk.pdf.Rendition.enableFloatingWindowCloseButton ( boolean  is_visible,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the flag to specify if the floating window should include user interface elements that allow a user to close a floating window.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Parameters
[in]is_visibletrue means the floating window should include user interface elements that allow a user to close a floating window, while false means the floating window does not need to include such user interface element.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ enableFloatingWindowTitleBar()

void com.foxit.sdk.pdf.Rendition.enableFloatingWindowTitleBar ( boolean  is_visible,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set flag to specify if the floating window should have a title bar.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Parameters
[in]is_visibletrue means the floating window should have a title bar, while false means the floating window does not need to have a title bar.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ getBackgroundColor()

long com.foxit.sdk.pdf.Rendition.getBackgroundColor ( ) throws com.foxit.sdk.PDFException

Get the background color for the rectangle in which the media is being played.

Returns
Background color. Format: 0xRRGGBB. The returned value 0xFFFFFF may also mean that no value for such property is defined in the rendition object.

◆ getBackgroundOpacity()

float com.foxit.sdk.pdf.Rendition.getBackgroundOpacity ( ) throws com.foxit.sdk.PDFException

Get the background opacity. (ignored for full-screen and hidden windows)

Returns
Background opacity. Valid range: 0.0 to 1.0. 0.0 means full transparency and 1.0 means full opaque. If no value for such property is defined in the rendition object, 1.0 would be returned by default.

◆ getDict()

PDFDictionary com.foxit.sdk.pdf.Rendition.getDict ( ) throws com.foxit.sdk.PDFException

Get PDF dictionary of current object.

Returns
The PDF dictionary. If there is any error, this function will return null.

◆ getDuration()

int com.foxit.sdk.pdf.Rendition.getDuration ( ) throws com.foxit.sdk.PDFException

Get the intrinsic duration.

Returns
Intrinsic duration value. It would be:
  • -2: use intrinsic duration;
  • -1: infinity duration;
  • >= 0: explicit duration.
If no value for such property is defined in the rendition object, -2 would be returned by default.

◆ getFitStyle()

int com.foxit.sdk.pdf.Rendition.getFitStyle ( ) throws com.foxit.sdk.PDFException

Get the fit style.

Fit style (manner) specifies how the player should treat a visual media type that does not exactly fit the rectangle in which it plays.

Returns
Fit style value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerFitStyleMeet and this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_MediaPlayerFitStyleDefault would be returned by default.

◆ getFloatingWindowHeight()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowHeight ( ) throws com.foxit.sdk.PDFException

Get the height of floating window, in pixels.

This property is necessary when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
Height of floating window, in pixels.

◆ getFloatingWindowOffscreenEvent()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowOffscreenEvent ( ) throws com.foxit.sdk.PDFException

Get the event type which specifies what should occur if the floating window is positioned totally or partially offscreen (that is, not visible on any physical monitor).

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
Event type for offscreen situation of floating window. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowOffscreenEventNone and this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_FloatingWindowOffscreenEventMoveResize would be returned by default.

◆ getFloatingWindowPosition()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowPosition ( ) throws com.foxit.sdk.PDFException

Get the position where floating window should be positioned to the related window.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Window relative specifies the place to which the floating window should be positioned.

Returns
Position value. Please refer to values starting from com.foxit.sdk.common.Constants.e_PosTopLeft and this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.common.Constants.e_PosCenter would be returned by default.

◆ getFloatingWindowRelatedWindowType()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowRelatedWindowType ( ) throws com.foxit.sdk.PDFException

Get the window relative type.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Related window type specifies the place to which the floating window should be positioned.

Returns
Related window type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowRelatedWindowDocument and this would be one of these values. this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_FloatingWindowRelatedWindowDocument would be returned by default.

◆ getFloatingWindowResizeType()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowResizeType ( ) throws com.foxit.sdk.PDFException

Get the resize type which specifies whether the floating window may be resized by a user.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
Resize type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowResizeTypeNo and this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_FloatingWindowResizeTypeNo would be returned by default.

◆ getFloatingWindowTitles()

WStringArray com.foxit.sdk.pdf.Rendition.getFloatingWindowTitles ( ) throws com.foxit.sdk.PDFException

Get the multi-language text array which provides text to display on the floating window's title bar.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Strings in the multi-language text array are in pair: the first string (ASCII string) in each pair is language identifier and the second string is the caption.

Returns
A string array that represents multi-language text array.

◆ getFloatingWindowWidth()

int com.foxit.sdk.pdf.Rendition.getFloatingWindowWidth ( ) throws com.foxit.sdk.PDFException

Get the width of floating window, in pixels.

This property is necessary when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
Width of floating window, in pixels.

◆ getMediaBaseURL()

String com.foxit.sdk.pdf.Rendition.getMediaBaseURL ( ) throws com.foxit.sdk.PDFException

Get the base URL.

Base URL is an absolute URL which is used in resolving any relative URLs found within the media data.

Returns
The base URL.

◆ getMediaClipContentType()

String com.foxit.sdk.pdf.Rendition.getMediaClipContentType ( ) throws com.foxit.sdk.PDFException

Get the content type (MIME type) of the media data.

Content type specifies the type of the media data represented by file specification. The content type string should conform to the content type specification described in Internet RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies.

Returns
Content type (MIME type).

◆ getMediaClipFile()

FileSpec com.foxit.sdk.pdf.Rendition.getMediaClipFile ( ) throws com.foxit.sdk.PDFException

Get the file specification of the actual media data.

Returns
A file specification object.

◆ getMediaClipName()

String com.foxit.sdk.pdf.Rendition.getMediaClipName ( ) throws com.foxit.sdk.PDFException

Get the name of the media clip, for use in user interface.

Returns
Name of the media clip.

◆ getMediaDescriptions()

WStringArray com.foxit.sdk.pdf.Rendition.getMediaDescriptions ( ) throws com.foxit.sdk.PDFException

Get the multi-language text array that provides alternate text descriptions for the media clip data in case it cannot be played.

Strings in the multi-language text array are in pair: the first string (ASCII string) in each pair is language identifier and the second string is the description.

Returns
The multi-language text array for description.

◆ getMediaPlayer()

MediaPlayer com.foxit.sdk.pdf.Rendition.getMediaPlayer ( int  type,
int  index 
) throws com.foxit.sdk.PDFException

Get a media player object by index for specified type.

Parameters
[in]typeMedia player type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerMustUsed and this should be one of these values.
[in]indexIndex of the media player object to be retrieved. Valid range: from 0 to (count-1). count is returned by function Rendition.getMediaPlayerCount .
Returns
A media player object.

◆ getMediaPlayerCount()

int com.foxit.sdk.pdf.Rendition.getMediaPlayerCount ( int  type) throws com.foxit.sdk.PDFException

Get the count of media player objects for specified type.

Parameters
[in]typeMedia player type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerMustUsed and this should be one of these values.
Returns
The count of media player objects for specified type.

◆ getMonitorSpecifier()

int com.foxit.sdk.pdf.Rendition.getMonitorSpecifier ( ) throws com.foxit.sdk.PDFException

Get the monitor specifier type value.

Monitor specifier is used to specify which monitor in a multi-monitor system a floating or full-screen window should appear on.

Returns
Monitor specifier type value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MonitorSpecifierLargest and this would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_MonitorSpecifierLargest would be returned by default.

◆ getPermission()

int com.foxit.sdk.pdf.Rendition.getPermission ( ) throws com.foxit.sdk.PDFException

Get the media permission.

Media permission indicates the circumstances under which it is acceptable to write a temporary file in order to play a media clip.

Returns
Media permission value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPermTempNever and this would be one of these values.

◆ getRenditionName()

String com.foxit.sdk.pdf.Rendition.getRenditionName ( ) throws com.foxit.sdk.PDFException

Get the name.

This name can be used for name tree lookup by JavaSript actions and can also be used in user interface.

Returns
Name of current rendition object.

◆ getRepeatCount()

int com.foxit.sdk.pdf.Rendition.getRepeatCount ( ) throws com.foxit.sdk.PDFException

Get the repeat count, similar to SMIL's repeatCount attribute.

Returns
The repeat count.0 means repeat forever. If no value for such property is defined in the rendition object, 1 would be returned by default.

◆ getVolume()

int com.foxit.sdk.pdf.Rendition.getVolume ( ) throws com.foxit.sdk.PDFException

Get the volume that specifies the desired volume level as a percentage of recorded volume level.

Returns
Volume value. 0 means mute.If no value for such property is defined in the rendition object, 100 would be returned by default.

◆ getWindowType()

int com.foxit.sdk.pdf.Rendition.getWindowType ( ) throws com.foxit.sdk.PDFException

Get the type of window that the media should play in.

Returns
Windows type value. Please refer to com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating values and it would be one of these values. If no value for such property is defined in the rendition object, com.foxit.sdk.pdf.Rendition.e_WindowTypeAnnotRect would be returned by default.

◆ hasFloatingWindowCloseButton()

boolean com.foxit.sdk.pdf.Rendition.hasFloatingWindowCloseButton ( ) throws com.foxit.sdk.PDFException

Check if the floating window should include user interface elements that allow a user to close a floating window.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
true means the floating window should include user interface elements that allow a user to close a floating window, while false means the floating window does not need to include such user interface element. If no value for such property is defined in the rendition object, true would be returned by default.

◆ hasFloatingWindowTitleBar()

boolean com.foxit.sdk.pdf.Rendition.hasFloatingWindowTitleBar ( ) throws com.foxit.sdk.PDFException

Check if the floating window should have a title bar.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Returns
true means the floating window should have a title bar, while false means the floating window does not need to have a title bar. If no value for such property is defined in the rendition object, true would be returned by default.

◆ hasMediaClip()

boolean com.foxit.sdk.pdf.Rendition.hasMediaClip ( ) throws com.foxit.sdk.PDFException

Check if current rendition object contains a media clip.

Returns
true means current rendition object contains a media clip, while false means current rendition object does not contain any media clip.

◆ isAutoPlay()

boolean com.foxit.sdk.pdf.Rendition.isAutoPlay ( ) throws com.foxit.sdk.PDFException

Check whether the media should automatically play when activated.

Returns
true means the media should automatically play when activated, while false means the media should be initially paused when activated (for example, the first frame is displayed). Relevant only for media that may be paused. If no value for such property is defined in the rendition object, true would be returned by default.

◆ isControlBarVisible()

boolean com.foxit.sdk.pdf.Rendition.isControlBarVisible ( ) throws com.foxit.sdk.PDFException

Check whether to display a player-specific controller user interface (for example, play/pause/stop controls) when playing.

Returns
true means to display a player-specific controller user interface, while false means not to display such user interface. If no value for such property is defined in the rendition object, false would be returned by default.

◆ isEmpty()

boolean com.foxit.sdk.pdf.Rendition.isEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ removeMediaPlayer()

void com.foxit.sdk.pdf.Rendition.removeMediaPlayer ( int  type,
MediaPlayer  player 
) throws com.foxit.sdk.PDFException

Remove a media player object for specified type.

Parameters
[in]typeMedia player type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerMustUsed and this should be one of these values.
[in]playerA media player object to be removed.
Returns
None.

◆ setBackgroundColor()

void com.foxit.sdk.pdf.Rendition.setBackgroundColor ( long  color,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the background color for the rectangle in which the media is being played.

Parameters
[in]colorBackground color to set. Format: 0xRRGGBB.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setBackgroundOpacity()

void com.foxit.sdk.pdf.Rendition.setBackgroundOpacity ( float  opacity,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the background opacity. (ignored for full-screen and hidden windows)

Parameters
[in]opacityBackground opacity. Valid range: 0.0 to 1.0. 0.0 means full transparency and 1.0 means full opaque.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setDuration()

void com.foxit.sdk.pdf.Rendition.setDuration ( int  duration,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the intrinsic duration.

Parameters
[in]durationIntrinsic duration value to set. It should be:
  • -2: use intrinsic duration;
  • -1: infinity duration;
  • >= 0: explicit duration.

[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFitStyle()

void com.foxit.sdk.pdf.Rendition.setFitStyle ( int  fit_style,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the fit style.

Fit style (manner) specifies how the player should treat a visual media type that does not exactly fit the rectangle in which it plays.

Parameters
[in]fit_styleFit style value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPlayerFitStyleMeet and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowOffscreenEvent()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowOffscreenEvent ( int  offscreen_event,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the event type which specifies what should occur if the floating window is positioned totally or partially offscreen (that is, not visible on any physical monitor).

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Parameters
[in]offscreen_eventEvent type for offscreen situation of floating window. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowOffscreenEventNone and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowPosition()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowPosition ( int  position,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the position where floating window should be positioned to the related window.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Window relative specifies the place to which the floating window should be positioned.

Parameters
[in]positionWindow relative type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowRelatedWindowDocument and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowRelatedWindowType()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowRelatedWindowType ( int  window_type,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the window relative type.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Related window type specifies the place to which the floating window should be positioned.

Parameters
[in]window_typeRelated window type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowRelatedWindowDocument and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowResizeType()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowResizeType ( int  resize_type,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the resize type which specifies whether the floating window may be resized by a user.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Parameters
[in]resize_typeResize type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_FloatingWindowResizeTypeNo and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowSize()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowSize ( int  width,
int  height,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the size of floating window, in pixels.

This property is necessary when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .

Parameters
[in]widthWidth of floating window, in pixels. This value should be larger than 0.
[in]heightHeight of floating window, in pixels. This value should be larger than 0.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setFloatingWindowTitles()

void com.foxit.sdk.pdf.Rendition.setFloatingWindowTitles ( WStringArray  titles,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the multi-language text array which provides text to display on the floating window's title bar.

This property is only useful when the windows type is com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating .
Strings in the multi-language text array are in pair: the first string (ASCII string) in each pair is language identifier and the second string is the caption.

Parameters
[in]titlesA string array that represents multi-language text array.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setMediaBaseURL()

void com.foxit.sdk.pdf.Rendition.setMediaBaseURL ( String  base_url,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the base URL.

Base URL is an absolute URL which is used in resolving any relative URLs found within the media data.

Parameters
[in]base_urlThe base URL to set.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setMediaClipContentType()

void com.foxit.sdk.pdf.Rendition.setMediaClipContentType ( String  content_type) throws com.foxit.sdk.PDFException

Set the content type (MIME type) of the media data.

Content type specifies the type of the media data represented by file specification. The content type string should conform to the content type specification described in Internet RFC 2045, Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies.
User is recommended to set the content type when setting a new file specification by function Rendition.setMediaClipFile .

Parameters
[in]content_typeContent type (MIME type).
Returns
None.

◆ setMediaClipFile()

void com.foxit.sdk.pdf.Rendition.setMediaClipFile ( FileSpec  file_specification) throws com.foxit.sdk.PDFException

Set the file specification of the actual media data.

This property is necessary for a rendition object. And user is recommended to set the content type by function Rendition.setMediaClipContentType after setting a new file specification.

Parameters
[in]file_specificationA file specification object.
Returns
None.

◆ setMediaClipName()

void com.foxit.sdk.pdf.Rendition.setMediaClipName ( String  name) throws com.foxit.sdk.PDFException

Set the name of the media clip, for use in user interface.

Parameters
[in]nameName string to be set for the media clip.
Returns
None.

◆ setMediaDescriptions()

void com.foxit.sdk.pdf.Rendition.setMediaDescriptions ( WStringArray  description_array) throws com.foxit.sdk.PDFException

Set the multi-language text array that provides alternate text descriptions for the media clip data in case it cannot be played.

Strings in the multi-language text array are in pair: the first string (ASCII string) in each pair is language identifier and the second string is the description.

Parameters
[in]description_arrayA multi-language text array for description.
Returns
None.

◆ setMonitorSpecifier()

void com.foxit.sdk.pdf.Rendition.setMonitorSpecifier ( int  monitor_specifier,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the monitor specifier type value.

Monitor specifier is used to specify which monitor in a multi-monitor system a floating or full-screen window should appear on.

Parameters
[in]monitor_specifierMonitor specifier type value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MonitorSpecifierLargest and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setPermission()

void com.foxit.sdk.pdf.Rendition.setPermission ( int  permission) throws com.foxit.sdk.PDFException

Set the media permission.

Media permission indicates the circumstances under which it is acceptable to write a temporary file in order to play a media clip.

Parameters
[in]permissionMedia permission value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaPermTempNever and this should be one of these values.
Returns
None.

◆ setRenditionName()

void com.foxit.sdk.pdf.Rendition.setRenditionName ( String  name) throws com.foxit.sdk.PDFException

Get the name.

This name can be used for name tree lookup by JavaSript actions and can also be used in user interface.

Parameters
[in]nameName of current rendition object.
Returns
None.

◆ setRepeatCount()

void com.foxit.sdk.pdf.Rendition.setRepeatCount ( int  count,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the repeat count, similar to SMIL's repeatCount attribute.

Parameters
[in]countThe repeat count to be set. 0 means repeat forever. This value should not be negative value.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setVolume()

void com.foxit.sdk.pdf.Rendition.setVolume ( int  volume,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the volume that specifies the desired volume level as a percentage of recorded volume level.

Parameters
[in]volumeVolume value to set. 0 means mute. This value should not be negative.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.

◆ setWindowType()

void com.foxit.sdk.pdf.Rendition.setWindowType ( int  window_type,
int  opt_type 
) throws com.foxit.sdk.PDFException

Set the type of window that the media should play in.

Parameters
[in]window_typeWindows type value. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_WindowTypeFloating and this should be one of these values.
[in]opt_typeMedia option type. Please refer to values starting from com.foxit.sdk.pdf.Rendition.e_MediaOptionMustBeHonored and this should be one of these values.
Returns
None.