java.lang.Object | |||
↳ | com.pdftron.pdf.Annot | ||
↳ | com.pdftron.pdf.annots.Markup | ||
↳ | com.pdftron.pdf.annots.Sound |
A sound annotation (PDF 1.2) shall analogous to a text annotation except that instead of a text note, it contains sound recorded from the computer's microphone or imported from a file. When the annotation is activated, the sound shall be played. The annotation shall behave like a text annotation in most ways, with a different icon (by default, a speaker) to indicate that it represents a sound.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_Mic | The Constant e_Mic. | |||||||||
int | e_Speaker | This integer list represents sub type of the Sound annotation. | |||||||||
int | e_Unknown | The Constant e_Unknown. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sound(Obj d)
Creates a Sound annotation and initialize it using given Cos/SDF object.
| |||||||||||
Sound()
Creates an empty Sound annoitation.
| |||||||||||
Sound(Annot annot)
Creates a Sound annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static Sound |
create(Doc doc, Rect pos)
Creates a new Sound annotation, in the specified document.
| ||||||||||
static Sound |
createWithData(Doc doc, Rect pos, Filter source_data, int bits_per_sample, int sample_freq, int num_channels)
Creates a new Sound annotation in the specified document.
| ||||||||||
int |
getIcon()
Get the sub type of the Sound annotation.
| ||||||||||
String |
getIconName()
Get the sub type of the Sound annotation.
| ||||||||||
Obj |
getSoundStream()
Get the initial sound object of the Sound annotation.
| ||||||||||
void |
setIcon(int type)
Set the sub type of the Sound annotation.
| ||||||||||
void |
setIcon(String type)
Set the sub type of the Sound annotation.
| ||||||||||
void |
setSoundStream(Obj sound_stream)
Set the initial sound object of the Sound annotation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
| |||||||||||
From class
java.lang.Object
|
The Constant e_Mic.
This integer list represents sub type of the Sound annotation. e_Speaker - Speaker Sound. e_Mic - Mic Sound. e_Unknow - User defined or Invalid. Default value: e_Speaker.
The Constant e_Unknown.
Creates a Sound annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d | the input Cos/SDF object |
---|
Creates an empty Sound annoitation.
Creates a Sound annotation and initialize it using given annotation object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot | the input annotation object |
---|
PDFNetException |
---|
Creates a new Sound annotation, in the specified document.
doc | A document to which the annotation is added. |
---|---|
pos | A rectangle specifying the annotation's bounds, specified in user space coordinates. |
PDFNetException |
---|
Creates a new Sound annotation in the specified document. Accepts raw audio data, along with a few parameters describing the format of that data
doc | A document to which the annotation is added. |
---|---|
pos | A rectangle specifying the annotation's bounds in default user space units. |
source_data | The raw sound data for the newly created annot |
bits_per_sample | The number of bits per sample in source data |
sample_freq | The number of samples per second present in source data |
num_channels | The number of audio channels in source_data |
PDFNetException |
---|
Get the sub type of the Sound annotation.
Note: The Icon indicates name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types e_Speaker and e_Mic. Additional types may be supported as well. However, user defined sub types has to be represented by string, in the enum"Icon", it will just show as "e_Unknow". Default value: e_Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
PDFNetException |
---|
Get the sub type of the Sound annotation.
Note: The Icon indicates a name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types Speaker and Mic. Additional types may be supported as well. Default value: Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
PDFNetException |
---|
Get the initial sound object of the Sound annotation.
Note: The sound stream is a sound object defining the sound that shall be played when the annotation is activated.
PDFNetException |
---|
Set the sub type of the Sound annotation. (Optional)
Note: The Icon indicates name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types e_Speaker and e_Mic. Additional types may be supported as well. However, user defined sub types has to be represented by string. In the enum"Icon", it will just show as "e_Unknow". Default value: e_Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
type | An entry in the "GetIcon" enum indicating the subtype of the Sound annotation. |
---|
PDFNetException |
---|
Set the sub type of the Sound annotation. (Optional)
Note: The Icon indicates a name of an icon that shall be used in displaying the annotation. Conforming readers shall provide predefined icon appearances for at least the standard types Speaker and Mic. Additional types may be supported as well. Default value: Speaker. The annotation dictionary's AP entry, if present, shall take precedence over the Name entry; see Table 168 and 12.5.5, "Appearance Streams."
type | - A string indicating the subtype of the Sound annotation. |
---|
PDFNetException |
---|
Set the initial sound object of the Sound annotation.
Note: The sound stream is a sound object defining the sound that shall be played when the annotation is activated.
sound_stream | - An SDF object representing a sound stream. |
---|
PDFNetException |
---|