Enum PdfSoundIcon
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies the name of an icon to be used in displaying the sound annotation.
public enum PdfSoundIcon
Fields
Mic = 1
Microphone icon of sound link.
Speaker = 0
Speaker icon of sound link.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new sound annotation.
PdfSoundAnnotation soundAnnotation = new PdfSoundAnnotation(rectangle, @"Input.wav");
//Sets the sound icon
soundAnnotation.Icon = PdfSoundIcon.Speaker;
//Add this annotation to a new page.
page.Annotations.Add(soundAnnotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new sound annotation.
Dim soundAnnotation As New PdfSoundAnnotation(rectangle, "Input.wav")
'Sets the sound icon
soundAnnotation.Icon = PdfSoundIcon.Speaker
'Add this annotation to a new page.
page.Annotations.Add(soundAnnotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)