WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedSoundAnnotation

    Show / Hide Table of Contents

    Class PdfLoadedSoundAnnotation

    Represents the loaded sound annotation class.

    Inheritance
    System.Object
    PdfAnnotation
    PdfLoadedAnnotation
    PdfLoadedStyledAnnotation
    PdfLoadedSoundAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfLoadedStyledAnnotation.CheckFlatten()
    PdfLoadedStyledAnnotation.FlattenAnnotationTemplate(PdfTemplate, Boolean)
    PdfLoadedStyledAnnotation.Color
    PdfLoadedStyledAnnotation.Opacity
    PdfLoadedStyledAnnotation.InnerColor
    PdfLoadedStyledAnnotation.Text
    PdfLoadedStyledAnnotation.Author
    PdfLoadedStyledAnnotation.Subject
    PdfLoadedStyledAnnotation.ModifiedDate
    PdfLoadedStyledAnnotation.Name
    PdfLoadedStyledAnnotation.Bounds
    PdfLoadedStyledAnnotation.Border
    PdfLoadedStyledAnnotation.Location
    PdfLoadedStyledAnnotation.Size
    PdfLoadedStyledAnnotation.AnnotationFlags
    PdfLoadedAnnotation.ObjectID
    PdfLoadedAnnotation.SetText(String)
    PdfLoadedAnnotation.GetValues(String)
    PdfLoadedAnnotation.SetValues(String, String)
    PdfLoadedAnnotation.CreationDate
    PdfLoadedAnnotation.Type
    PdfLoadedAnnotation.Page
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.Initialize()
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.Flatten
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.PdfTag
    PdfAnnotation.Layer
    PdfAnnotation.Rotate
    PdfAnnotation.PropertyChanged
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    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
    PdfLoadedDocument
    PdfLoadedPage

    FileName

    Declaration
    public string FileName { get; }
    Property Value
    Type Description
    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 Description
    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
    PdfLoadedDocument
    PdfLoadedPage

    Sound

    Gets or sets the sound of the annotation.

    Declaration
    public PdfSound Sound { get; set; }
    Property Value
    Type Description
    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
    PdfAnnotation.Save()

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

    PdfLoadedAttachmentAnnotation
    PdfLoadedDocumentLinkAnnotation
    PdfLoadedFileLinkAnnotation
    PdfLoadedLineAnnotation
    PdfLoadedPopupAnnotation
    PdfLoadedRubberStampAnnotation
    PdfLoadedTextMarkupAnnotation
    PdfLoadedTextWebLinkAnnotation
    PdfLoadedUriAnnotation
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved