menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedStyledAnnotation - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfLoadedStyledAnnotation

    Represents the PdfLoadedStyledAnnotation class

    Inheritance
    System.Object
    PdfAnnotation
    PdfLoadedAnnotation
    PdfLoadedStyledAnnotation
    PdfLoadedAttachmentAnnotation
    PdfLoadedCircleAnnotation
    PdfLoadedDocumentLinkAnnotation
    PdfLoadedEllipseAnnotation
    PdfLoadedFileLinkAnnotation
    PdfLoadedFreeTextAnnotation
    PdfLoadedInkAnnotation
    PdfLoadedLineAnnotation
    PdfLoadedPolygonAnnotation
    PdfLoadedPolyLineAnnotation
    PdfLoadedPopupAnnotation
    PdfLoadedRectangleAnnotation
    PdfLoadedRedactionAnnotation
    PdfLoadedRichMediaAnnotation
    PdfLoadedRubberStampAnnotation
    PdfLoadedSoundAnnotation
    PdfLoadedSquareAnnotation
    PdfLoadedTextMarkupAnnotation
    PdfLoadedTextWebLinkAnnotation
    PdfLoadedUriAnnotation
    PdfLoadedWatermarkAnnotation
    PdfLoadedWidgetAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.Flatten
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.Initialize()
    PdfAnnotation.Layer
    PdfAnnotation.PdfTag
    PdfAnnotation.PropertyChanged
    PdfAnnotation.Rotate
    PdfAnnotation.Save()
    PdfAnnotation.SetAppearance(Boolean)
    PdfLoadedAnnotation.CreationDate
    PdfLoadedAnnotation.GetValues(String)
    PdfLoadedAnnotation.ObjectID
    PdfLoadedAnnotation.Page
    PdfLoadedAnnotation.SetText(String)
    PdfLoadedAnnotation.SetValues(String, String)
    PdfLoadedAnnotation.Type
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfLoadedStyledAnnotation : PdfLoadedAnnotation, IPdfWrapper, INotifyPropertyChanged
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the annotation flags
    attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
    //Sets the file name.
    fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt";
    // Set the file link annotation border.
    fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
    //Set the file link annotation color.
    fileLinkAnnotation.Color=new PdfColor(Color.Blue);
    //Sets the file link annotation text.
    fileLinkAnnotation.Text = "File Link Annotation";
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the annotation flags
    attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
    'Sets the file name.
    fileLinkAnnotation.FileName = @"..\..\Data\Manual.txt"
    ' Set the file link annotation border.
    fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
    'Set the file link annotation color.
    fileLinkAnnotation.Color=New PdfColor(Color.Blue)
    'Sets the file link annotation text.
    fileLinkAnnotation.Text = "File Link Annotation"
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Properties

    AnnotationFlags

    Gets or sets the annotation flags.

    Declaration
    public override PdfAnnotationFlags AnnotationFlags { get; set; }
    Property Value
    Type
    PdfAnnotationFlags
    Overrides
    PdfAnnotation.AnnotationFlags
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the annotation flags
    attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the annotation flags
    attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Author

    Gets or Sets the Author of the annotation.

    Declaration
    public override string Author { get; set; }
    Property Value
    Type
    System.String
    Overrides
    PdfAnnotation.Author

    Border

    Gets or sets the annotation's border.

    Declaration
    public override PdfAnnotationBorder Border { get; set; }
    Property Value
    Type
    PdfAnnotationBorder
    Overrides
    PdfAnnotation.Border
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the annotation flags
    attchmentAnnotation.AnnotationFlags=PdfAnnotationFlags.Default;
    // Set the file link annotation border.
    fileLinkAnnotation.Border=new PdfAnnotationBorder(4, 0, 0);
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    ' Set the file link annotation border.
    fileLinkAnnotation.Border=New PdfAnnotationBorder(4, 0, 0)
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Bounds

    Gets or sets the annotation's bounds. If this property is not set, bounds are calculated automatically based on Location property and content of annotation.

    Declaration
    public override RectangleF Bounds { get; set; }
    Property Value
    Type
    RectangleF
    Overrides
    PdfAnnotation.Bounds
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    'Sets the file link annotation bounds.
    fileLinkAnnotation.Bounds = new RectangleF(100,100,50,50);
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the file link annotation bounds.
    fileLinkAnnotation.Bounds = New RectangleF(100,100,50,50)
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Color

    Gets or sets the color.

    Declaration
    public override PdfColor Color { get; set; }
    Property Value
    Type Description
    PdfColor

    The color.

    Overrides
    PdfAnnotation.Color
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Set the file link annotation color.
    fileLinkAnnotation.Color=new PdfColor(Color.Blue);
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Set the file link annotation color.
    fileLinkAnnotation.Color=New PdfColor(Color.Blue)
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    InnerColor

    Gets or sets the inner color of the annotation, Default color is transparent

    Declaration
    public override PdfColor InnerColor { get; set; }
    Property Value
    Type
    PdfColor
    Overrides
    PdfAnnotation.InnerColor

    Location

    Gets or sets the location.

    Declaration
    public override PointF Location { get; set; }
    Property Value
    Type
    PointF
    Overrides
    PdfAnnotation.Location
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the file link Annotation location.
    fileLinkAnnotation.Location new PointF(100,100);
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the file link Annotation location
    fileLinkAnnotation.Location =New PointF(100,100)
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    ModifiedDate

    Gets or Sets the ModifiedDate of the annotation.

    Declaration
    public override DateTime ModifiedDate { get; set; }
    Property Value
    Type
    System.DateTime
    Overrides
    PdfAnnotation.ModifiedDate

    Name

    Gets or sets the name of the annotation.

    Declaration
    public string Name { get; set; }
    Property Value
    Type
    System.String

    Opacity

    Gets or sets the Opacity of the annotation, Default value is 1.0f

    Declaration
    public override float Opacity { get; set; }
    Property Value
    Type
    System.Single
    Overrides
    PdfAnnotation.Opacity

    Size

    Gets or sets the size.

    Declaration
    public override SizeF Size { get; set; }
    Property Value
    Type
    SizeF
    Overrides
    PdfAnnotation.Size
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the size
    attchmentAnnotation.Size=new SizeF(100,50)
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the size
    attchmentAnnotation.Size=New SizeF(100,50)
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Subject

    Gets or Sets the Subject of the annotation.

    Declaration
    public override string Subject { get; set; }
    Property Value
    Type
    System.String
    Overrides
    PdfAnnotation.Subject

    Text

    Gets or sets the text.

    Declaration
    public override string Text { get; set; }
    Property Value
    Type Description
    System.String

    The text.

    Overrides
    PdfAnnotation.Text
    Examples
    //Load an existing document.
    PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
    //Gets the annotation from loaded document.
    PdfLoadedFileLinkAnnotation fileLinkAnnotation = document.Pages[1].Annotations[6] as PdfLoadedFileLinkAnnotation;
    //Sets the file link annotation text.
    fileLinkAnnotation.Text = "File Link Annotation";
    //Save the document.
    document.Save("fileLinkAnnotation.pdf");
    document.Close(true);
    'Load an existing document.
    Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
    'Gets the annotation from loaded document.
    Dim fileLinkAnnotation As PdfLoadedFileLinkAnnotation = document.Pages(1).Annotations(6) as PdfLoadedFileLinkAnnotation
    'Sets the file link annotation text.
    fileLinkAnnotation.Text = "File Link Annotation"
    'Save the document.
    document.Save("fileLinkAnnotation.pdf")
    document.Close(True)

    Methods

    CheckFlatten()

    Obtain annotation need flatten

    Declaration
    protected void CheckFlatten()

    FlattenAnnotationTemplate(PdfTemplate, Boolean)

    Flatten annotation template

    Declaration
    protected void FlattenAnnotationTemplate(PdfTemplate appearance, bool isNormalMatrix)
    Parameters
    Type Name Description
    PdfTemplate appearance

    The appearance value.

    System.Boolean isNormalMatrix

    Implements

    System.ComponentModel.INotifyPropertyChanged
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved