Table of Contents

Enum PdfSoundChannels

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

The number of sound channels.

public enum PdfSoundChannels

Fields

Mono = 1

One channel.

Stereo = 2

Two channels.

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")
sound.Channels = PdfSoundChannels.Mono
'Save the document.
document.Save("SoundAnnotation.pdf")
document.Close(True)

See Also