Class PdfLoadedSoundAnnotation
Represents the loaded sound annotation class.
Inheritance
System.Object
PdfLoadedSoundAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfLoadedSoundAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
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.
Declaration
public PdfLoadedPopupAnnotationCollection Comments { get; }
Property Value
Type | Description |
---|---|
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
Declaration
public string FileName { get; }
Property Value
Type |
---|
System.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);
Icon
Gets or sets the icon of the annotation.
Declaration
public PdfSoundIcon Icon { get; set; }
Property Value
Type |
---|
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);
ReviewHistory
Gets the annotation review history.
Declaration
public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public PdfSound Sound { get; set; }
Property Value
Type |
---|
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)
Methods
Save()
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged