Xamarin.Android

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

    Show / Hide Table of Contents

    Class PdfInkAnnotation

    Represents the ink annotation class.

    Inheritance
    System.Object
    PdfAnnotation
    PdfInkAnnotation
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfAnnotation.SetAppearance(Boolean)
    PdfAnnotation.CalculateBounds(RectangleF, PdfPage, PdfLoadedPage)
    PdfAnnotation.SetValues(String, String)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean, PdfGraphics)
    PdfAnnotation.CalculateTemplateBounds(RectangleF, PdfPageBase, PdfTemplate, Boolean)
    PdfAnnotation.CheckFlatten()
    PdfAnnotation.Color
    PdfAnnotation.Opacity
    PdfAnnotation.InnerColor
    PdfAnnotation.Border
    PdfAnnotation.Bounds
    PdfAnnotation.Location
    PdfAnnotation.Size
    PdfAnnotation.Page
    PdfAnnotation.Text
    PdfAnnotation.Author
    PdfAnnotation.Subject
    PdfAnnotation.ModifiedDate
    PdfAnnotation.AnnotationFlags
    PdfAnnotation.Flatten
    PdfAnnotation.FlattenPopUps
    PdfAnnotation.PdfTag
    PdfAnnotation.Layer
    PdfAnnotation.Rotate
    PdfAnnotation.Name
    PdfAnnotation.PropertyChanged
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfInkAnnotation : PdfAnnotation, IPdfWrapper, INotifyPropertyChanged
    Remarks

    Please refer the UG docuemntation link for more details.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //set the points
    List(float) linePoints = new List(float) { 40, 300, 60, 100, 40, 50, 40, 300 };
    //Create a new ink annotation
    RectangleF rectangle = new RectangleF(0, 0, 300, 400);
    //Create a inkAnnotation and set the properties
    PdfInkAnnotation inkAnnotation = new PdfInkAnnotation(rectangle, linePoints);
    inkAnnotation.Color = new PdfColor(Color.Red);
    inkAnnotation.BorderWidth = 4;
    inkAnnotation.BorderStyle = PdfLineBorderStyle.Beveled;
    //Add annotation to the page
    page.Annotations.Add(inkAnnotation);
    //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()
    'set the points
    Dim linePoints As New List(Of Single) (New Single() {40, 300, 60, 100, 40, 50, 40, 300})
    'Create a new ink annotation 
    Dim rectangle As New RectangleF(0, 0, 300, 400)
    'Create a inkAnnotation and set the properties
    Dim inkAnnotation As New PdfInkAnnotation(rectangle, linePoints)
    inkAnnotation.Color = New PdfColor(Color.Red)
    inkAnnotation.BorderWidth = 4
    inkAnnotation.BorderStyle = PdfLineBorderStyle.Beveled
    'Add annotation to the page
    page.Annotations.Add(inkAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)

    Constructors

    PdfInkAnnotation(RectangleF, List<Single>)

    Declaration
    public PdfInkAnnotation(RectangleF rectangle, List<float> linePoints)
    Parameters
    Type Name Description
    RectangleF rectangle
    System.Collections.Generic.List<System.Single> linePoints

    Properties

    BorderStyle

    Declaration
    public PdfLineBorderStyle BorderStyle { get; set; }
    Property Value
    Type Description
    PdfLineBorderStyle

    BorderWidth

    Declaration
    public int BorderWidth { get; set; }
    Property Value
    Type Description
    System.Int32

    Comments

    Declaration
    public PdfPopupAnnotationCollection Comments { get; }
    Property Value
    Type Description
    PdfPopupAnnotationCollection

    DashArray

    Declaration
    public int[] DashArray { get; set; }
    Property Value
    Type Description
    System.Int32[]

    InkList

    Declaration
    public List<float> InkList { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.Single>

    InkPointsCollection

    Declaration
    public List<List<float>> InkPointsCollection { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<System.Collections.Generic.List<System.Single>>

    ReviewHistory

    Declaration
    public PdfPopupAnnotationCollection ReviewHistory { get; }
    Property Value
    Type Description
    PdfPopupAnnotationCollection

    Methods

    Initialize()

    Initializes annotation object.

    Declaration
    protected override void Initialize()
    Overrides
    PdfAnnotation.Initialize()

    Save()

    Saves an annotation.

    Declaration
    protected override void Save()
    Overrides
    PdfAnnotation.Save()

    Implements

    System.ComponentModel.INotifyPropertyChanged

    See Also

    PdfDocument
    PdfPage
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved