Foxit PDF SDK
FSSound Class Reference
Inheritance diagram for FSSound:
FSMarkup FSAnnot FSBase

Instance Methods

(int) - getBits
 Get the number of bits per sample value per channel.
More...
 
(int) - getChannelCount
 Get the count of sound channels.
More...
 
(NSString *) - getCompressionFormat
 Get the name of the sound compression format used on the sample data.
More...
 
(FSFileSpec *) - getFileSpec
 Get the file specification object which represents an external sound file.
More...
 
(FSSoundSampleEncodingFormat- getSampleEncodingFormat
 Get the encoding format for the sample data.
More...
 
(float) - getSamplingRate
 Get the sampling rate, in samples per second.
More...
 
(FSPDFStream *) - getSoundStream
 Get the stream of sound data.
More...
 
(id) - init
 Constructor.

 
(id) - initWithAnnot:
 Constructor, with parent class object.
More...
 
- Instance Methods inherited from FSMarkup
(FSNote *) - addReply
 Add a new reply to the end of reply list.
More...
 
(void) - addRichText:style:
 Add a new rich text string to the end.
More...
 
(FSNote *) - addStateAnnot:model:state:
 Add a new state annotation.
More...
 
(FSMarkupArray *) - getGroupElements
 Get an element (as markup annotation) from the group that current markup annotation belongs to.
More...
 
(FSMarkup *) - getGroupHeader
 Get the header annotation (as primary annotation) of the group that current markup annotation belongs to.
More...
 
(FSNote *) - getReply:
 Get a reply by index.
More...
 
(int) - getReplyCount
 Count all replies.
More...
 
(NSString *) - getRichTextContent:
 Get text string of a rich text string specified by index.
More...
 
(int) - getRichTextCount
 Get the count of rich text strings.
More...
 
(FSRichTextStyle *) - getRichTextStyle:
 Get style data of a rich text string specified by index.
More...
 
(FSNoteArray *) - getStateAnnots:
 Get all state annotations in a specified state model.
More...
 
(void) - insertRichText:content:style:
 Insert a new rich text string to the place which is specified by index.
More...
 
(BOOL) - isGrouped
 Check whether current markup annotation is in a group or not.
More...
 
(BOOL) - removeAllReplies
 Remove all the replies.
More...
 
(BOOL) - removeAllStateAnnots
 Remove all the state annotations.
More...
 
(BOOL) - removePopup
 Remove related pop-up annotation.
More...
 
(BOOL) - removeReply:
 Remove a reply by index.
More...
 
(void) - removeRichText:
 Remove a rich text string specified by index.
More...
 
(void) - setRichTextContent:content:
 Set text string of a rich text string specified by index.
More...
 
(void) - setRichTextStyle:style:
 Set style data of a rich text string specified by index.
More...
 
(BOOL) - ungroup
 Ungroup current markup annotation from the group it belongs to.
More...
 
- Instance Methods inherited from FSAnnot
(BOOL) - FSMoveWithResetAppearance:is_reset_appearance:
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
More...
 
(BOOL) - FSResetApStreamWithIsGenerateNewAppearanceObj:
 Reset appearance stream.
More...
 
(FSPDFStream *) - getAppearanceStream:appearance_state:
 Get annotation's appearance stream with specified type and state.
More...
 
(FSRectI *) - getDeviceRect:
 Get annotation rectangle in device coordinate system.
More...
 
(FSPDFDictionary *) - getDict
 Get annotation's dictionary object.
More...
 
(FSMatrix2D *) - getDisplayMatrix:
 Get the display matrix, from PDF coordinate system to targeted device coordinate system.
More...
 
(int) - getIndex
 Get the index of current annotation in the page which current annotation belongs to.
More...
 
(FSPDFDictionary *) - getOptionalContent
 Get the PDF dictionary of annotation's optional content.
More...
 
(FSPDFPage *) - getPage
 Get the related PDF page.
More...
 
(FSRectF *) - getRect
 Get rectangle, in PDF coordinate system.
More...
 
(FSAnnotType- getType
 Get actual annotation type of current annotation.
More...
 
(BOOL) - hasProperty:
 Whether current annotation has the specified annotation's property.
More...
 
(id) - initWithPage:annot_dict:
 Constructor, with PDF page and annotation's PDF dictionary.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 
(BOOL) - isMarkup
 Check if current annotation is a markup annotation.
More...
 
(BOOL) - move:
 Move current annotation to a new position, specified by a new rectangle in PDF coordinate system.
More...
 
(BOOL) - removeProperty:
 Remove a specified annotation's property.
More...
 
(BOOL) - resetAppearanceStream
 Reset appearance stream.
More...
 

Additional Inherited Members

- Properties inherited from FSMarkup
FSDateTimecreationDateTime
 Get or Set creation date time.

 
NSString * intent
 Get or Set intent name.
More...
 
float opacity
 Get or Set opacity value.
More...
 
FSPopuppopup
 Get or Set related pop-up annotation.
More...
 
NSString * subject
 Get or Set subject string.

 
NSString * title
 Get or Set title string.
More...
 
- Properties inherited from FSAnnot
unsigned int borderColor
 Get or Set border color.
More...
 
FSBorderInfoborderInfo
 Get or Set border information.
More...
 
NSString * content
 Get or Set content.

 
unsigned int flags
 Get or Set annotation flags.

 
FSDateTimemodifiedDateTime
 Get or Set last modified date time.

 
NSString * uniqueID
 Get or Set unique ID.

 

Detailed Description

A sound annotation (PDF 1.2) is 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. Sound annotation is a kind of markup annotation, so class FSSound is derived from class FSMarkup . Currently, only support to get the properties or data of a sound annotation. Not support to modify a sound annotation (including reseting appearance) yet.

See also
FSMarkup

Method Documentation

◆ getBits()

- (int) getBits

Get the number of bits per sample value per channel.

Returns
The number of bits per sample value per channel.

◆ getChannelCount()

- (int) getChannelCount

Get the count of sound channels.

Returns
The count of sound channels.

◆ getCompressionFormat()

- (NSString *) getCompressionFormat

Get the name of the sound compression format used on the sample data.

Returns
The name of the sound compression format used on the sample data.

◆ getFileSpec()

- (FSFileSpec *) getFileSpec

Get the file specification object which represents an external sound file.

A sound may be defined in an external file (represented by a file specification object). The sound file should be self- describing, containing all information needed to render the sound; no additional information need be present in the PDF file.
In this case, the returned stream object should be ignored.

Returns
A file specification object which represents an external sound file. If the return value of function FileSpec::isEmpty for the returned file specification object is YES, that means no external sound file is used for current sound annotation. In this case, please use function Sound::getSoundStream to get the sound data.

◆ getSampleEncodingFormat()

- (FSSoundSampleEncodingFormat) getSampleEncodingFormat

Get the encoding format for the sample data.

Returns
The encoding format for the sample data. Please refer to values starting from FSSoundSampleEncodingFormatRaw and this would be one of these values.

◆ getSamplingRate()

- (float) getSamplingRate

Get the sampling rate, in samples per second.

Returns
The sampling rate. If there is any error, this function will return -1.

◆ getSoundStream()

- (FSPDFStream *) getSoundStream

Get the stream of sound data.

The stream of sound data represents the sound and can be used to be played when the annotation is activated.
Specially, if function Sound::getFileSpec returns a valid file specification object (whose FileSpec::isEmpty returns NO), please use that file specification object instead of the stream returned by this function.

Returns
The stream of sound data. If there is no "Sound" entry or any error occurs, this function will return nil.

◆ initWithAnnot:()

- (id) initWithAnnot: (FSAnnot*)  annot

Constructor, with parent class object.

Parameters
[in]annotParent class object.

Reimplemented from FSMarkup.