SoundAnnotation

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

public final class SoundAnnotation extends MarkupAnnotation

Represents a sound annotation that contains sound recorded from the computer’s microphone or imported from a file.

Constructors

ConstructorDescription
SoundAnnotation(Page page, Rectangle rect, String soundFile)Creates new Sound annotation on the specified page.
SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData)Creates new Sound annotation on the specified page.

Methods

MethodDescription
getIcon()Gets an icon to be used in displaying the annotation.
setIcon(int value)Sets an icon to be used in displaying the annotation.
getSoundData()Gets a sound object defining the sound to be played when the annotation is activated.
getAnnotationType()Gets type of annotation.
accept(AnnotationSelector visitor)Accepts visitor object to process the annotation.

SoundAnnotation(Page page, Rectangle rect, String soundFile)

public SoundAnnotation(Page page, Rectangle rect, String soundFile)

Creates new Sound annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageThe document’s page where annotation should be created.
rectRectangleThe annotation rectangle, defining the location of the annotation on the page.
soundFilejava.lang.StringA sound file defining the sound to be played when the annotation is activated.

SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData)

public SoundAnnotation(Page page, Rectangle rect, String soundFile, SoundSampleData soundSampleData)

Creates new Sound annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageThe document’s page where annotation should be created.
rectRectangleThe annotation rectangle, defining the location of the annotation on the page.
soundFilejava.lang.StringA sound file defining the sound to be played when the annotation is activated.
soundSampleDataSoundSampleDataA sound sample data contains extra of sound parameters such as sampling rate, bits per sample and so on.

getIcon()

public int getIcon()

Gets an icon to be used in displaying the annotation.

Returns: int - SoundIcon value

setIcon(int value)

public void setIcon(int value)

Sets an icon to be used in displaying the annotation.

Parameters:

ParameterTypeDescription
valueintSoundIcon value

getSoundData()

public SoundData getSoundData()

Gets a sound object defining the sound to be played when the annotation is activated.

Returns: SoundData - SoundData value

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType value

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object to process the annotation.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.