RichMediaAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation

public class RichMediaAnnotation extends Annotation

Class describes RichMediaAnnotation which allows embed video/audio data into PDF document.

Constructors

ConstructorDescription
RichMediaAnnotation(Page page, Rectangle rect)Initializes RichMediaAnnotation.

Methods

MethodDescription
getAnnotationType()Gets type of annotation.
accept(AnnotationSelector visitor)Accepts visitor for this annotation.
getCustomPlayer()Sets or gets custom flash player to play video/audio data.
setCustomPlayer(InputStream value)Sets or gets custom flash player to play video/audio data.
getCustomFlashVariables()Sets or gets flash variables which passed to player.
setCustomFlashVariables(String value)Sets or gets flash variables which passed to player.
addCustomData(String name, InputStream data)Add custom named data (for example required for flash script).
setContent(String fileName, InputStream audio)Set content stream.
getContent()Data of the Rich Media content.
getType()Gets or sets type of content.
setType(int value)Gets or sets type of content.
getActivateOn()Event which activates application.
setActivateOn(int value)Event which activates application.
setPoster(InputStream imageStream)Set poster of the annotation.
update()Updates data with specified parameters.

RichMediaAnnotation(Page page, Rectangle rect)

public RichMediaAnnotation(Page page, Rectangle rect)

Initializes RichMediaAnnotation.

Parameters:

ParameterTypeDescription
pagePagePage where object being created.
rectRectangleRectangle coordinates.

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType element

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor for this annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor instance.

getCustomPlayer()

public InputStream getCustomPlayer()

Sets or gets custom flash player to play video/audio data.

Returns: java.io.InputStream - InputStream object

setCustomPlayer(InputStream value)

public void setCustomPlayer(InputStream value)

Sets or gets custom flash player to play video/audio data.

Parameters:

ParameterTypeDescription
valuejava.io.InputStreamInputStream object

getCustomFlashVariables()

public String getCustomFlashVariables()

Sets or gets flash variables which passed to player.

Returns: java.lang.String - String object

setCustomFlashVariables(String value)

public void setCustomFlashVariables(String value)

Sets or gets flash variables which passed to player.

Parameters:

ParameterTypeDescription
valuejava.lang.StringString object

addCustomData(String name, InputStream data)

public void addCustomData(String name, InputStream data)

Add custom named data (for example required for flash script).

Parameters:

ParameterTypeDescription
namejava.lang.StringName of the data.
datajava.io.InputStreamData.

setContent(String fileName, InputStream audio)

public void setContent(String fileName, InputStream audio)

Set content stream.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringName of the stream.
audiojava.io.InputStreamData stream.

getContent()

public InputStream getContent()

Data of the Rich Media content.

Returns: java.io.InputStream - InputStream object

getType()

public int getType()

Gets or sets type of content. Possible values: Audio, Video.

Returns: int - ContentType value

setType(int value)

public void setType(int value)

Gets or sets type of content. Possible values: Audio, Video.

Parameters:

ParameterTypeDescription
valueintContentType element

getActivateOn()

public int getActivateOn()

Event which activates application.

Returns: int - ActivationEvent element

setActivateOn(int value)

public void setActivateOn(int value)

Event which activates application.

Parameters:

ParameterTypeDescription
valueintActivationEvent element

setPoster(InputStream imageStream)

public void setPoster(InputStream imageStream)

Set poster of the annotation.

Parameters:

ParameterTypeDescription
imageStreamjava.io.InputStreamStream containing poster image.

update()

public void update()

Updates data with specified parameters.