Table of Contents

Class PdfLoadedSoundAnnotation

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded sound annotation class.

public class PdfLoadedSoundAnnotation : PdfLoadedStyledAnnotation, INotifyPropertyChanged
Inheritance
PdfLoadedSoundAnnotation
Implements
Inherited Members

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
//Sets the sound annotation border
soundAnnotation.Border.Width = 4;
soundAnnotation.Border.HorizontalRadius = 20;
soundAnnotation.Border.VerticalRadius = 30;
//Set the PDF sound annotation icon.
soundAnnotation.Icon = PdfSoundIcon.Speaker;
//Sets the PDF sound.
 PdfSound sound = new PdfSound("Startup.wav");
 soundAnnotation.Sound=sound;
//Save the document.
document.Save("SoundAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
'Sets the sound annotation border
soundAnnotation.Border.Width = 4
soundAnnotation.Border.HorizontalRadius = 20
soundAnnotation.Border.VerticalRadius = 30
'Set the PDF sound annotation icon.
soundAnnotation.Icon = PdfSoundIcon.Speaker
Sets the PDF sound.
Dim sound As PdfSound  = New PdfSound("Startup.wav")
soundAnnotation.Sound=sound
'Save the document.
document.Save("SoundAnnotation.pdf")
document.Close(True)

Properties

Comments

Gets the annotation Comments history.

public PdfLoadedPopupAnnotationCollection Comments { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The Comments collection of the sound annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfSoundAnnotation
PdfLoadedSoundAnnotation  sound = document.Pages[0].Annotations[0] as PdfLoadedSoundAnnotation;
//Get the Comments collection
PdfLoadedPopupAnnotationCollection CommentsCollection = sound.Comments;
//save the document
document.Save("PdfSoundAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfSoundAnnotation
Dim sound As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the Comments collection
Dim CommentsCollection As PdfLoadedPopupAnnotationCollection = sound.Comments
'save the document
document.Save("PdfSoundAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

FileName

public string FileName { get; }

Property Value

string

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
'Gets the file name
string filename =soundAnnotation.FileName;
//Save the document.
document.Save("SoundAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
'Gets the file name
Dim filename As String=soundAnnotation.FileName
'Save the document.
document.Save("SoundAnnotation.pdf")
document.Close(True);
See Also

Icon

Gets or sets the icon of the annotation.

public PdfSoundIcon Icon { get; set; }

Property Value

PdfSoundIcon

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
//Set the pdfsound icon
soundAnnotation.Icon = PdfSoundIcon.Speaker;
//Save the document.
document.Save("SoundAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
'Set the pdfsound icon
soundAnnotation.Icon = PdfSoundIcon.Speaker
'Save the document.
document.Save("SoundAnnotation.pdf")
document.Close(True);
See Also

ReviewHistory

Gets the annotation review history.

public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The review collection of the sound annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfSoundAnnotation
PdfLoadedSoundAnnotation  sound = document.Pages[0].Annotations[0] as PdfLoadedSoundAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = sound.ReviewHistory;
//save the document
document.Save("PdfSoundAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfSoundAnnotation
Dim sound As PdfLoadedFreeTextAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = sound.ReviewHistory
'save the document
document.Save("PdfSoundAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

Sound

Gets or sets the sound of the annotation.

public PdfSound Sound { get; set; }

Property Value

PdfSound

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedSoundAnnotation soundAnnotation = document.Pages[1].Annotations[5] as PdfLoadedSoundAnnotation;
//Sets the PDF sound.
PdfSound sound = new PdfSound("Startup.wav");
soundAnnotation.Sound=sound;
//Save the document.
document.Save("SoundAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim soundAnnotation As PdfLoadedSoundAnnotation = document.Pages(1).Annotations(5) as PdfLoadedSoundAnnotation
Sets the PDF sound.
Dim sound As PdfSound  = New PdfSound("Startup.wav")
soundAnnotation.Sound=sound
'Save the document.
document.Save("SoundAnnotation.pdf")
document.Close(True)
See Also

Methods

Save()

Saves an annotation.

protected override void Save()
See Also

See Also