Xamarin.Android

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

    Show / Hide Table of Contents

    Class PdfLineAnnotation

    Represents a line annotation.

    Inheritance
    System.Object
    PdfAnnotation
    PdfLineAnnotation
    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 PdfLineAnnotation : PdfAnnotation, IPdfWrapper, INotifyPropertyChanged
    Remarks

    This PdfLineAnnotation class is used to represents line annotation in PDF document. 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();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annotation");
    //Create PDF line border
    LineBorder lineBorder = new LineBorder();
    lineBorder.BorderStyle = PdfBorderStyle.Solid;
    lineBorder.BorderWidth = 1;
    lineAnnotation.lineBorder = lineBorder;
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
    //Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
    //Assign the line color
    lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
    lineAnnotation.BackColor = new PdfColor(Color.Green);
    //Assign the leader line
    lineAnnotation.LeaderLineExt = 0;
    lineAnnotation.LeaderLine = 0;
    //Assign the Line caption type
    lineAnnotation.LineCaption = true;
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Create PDF line border
    Dim lineBorder As New LineBorder()
    lineBorder.BorderStyle = PdfBorderStyle.Solid
    lineBorder.BorderWidth = 1
    lineAnnotation.lineBorder = lineBorder
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension
    'Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
    'Assign the line color
    lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
    lineAnnotation.BackColor = New PdfColor(Color.Green)
    'Assign the leader line
    lineAnnotation.LeaderLineExt = 0
    lineAnnotation.LeaderLine = 0
    'Assign the Line caption type
    lineAnnotation.LineCaption = True
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)

    Constructors

    PdfLineAnnotation(RectangleF)

    Initializes new instance of PdfLineAnnotation class with specified bounds.

    Declaration
    public PdfLineAnnotation(RectangleF rectangle)
    Parameters
    Type Name Description
    RectangleF rectangle

    The bounds of the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation and set properties.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(new RectangleF(80, 420, 150, 420));
    lineAnnotation.Text = "Line Annotation";
    lineAnnotation.LinePoints = points;
    //Create pdf line border
    LineBorder lineBorder = new LineBorder();
    lineBorder.BorderStyle = PdfBorderStyle.Solid;
    lineBorder.BorderWidth = 1;
    lineAnnotation.lineBorder = lineBorder;
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
    //Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
    //Assign the line color
    lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
    lineAnnotation.BackColor = new PdfColor(Color.Green);
    //Assign the leader line
    lineAnnotation.LeaderLineExt = 0;
    lineAnnotation.LeaderLine = 0;
    //Assign the Line caption type
    lineAnnotation.LineCaption = true;
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation and set properties.
    Dim lineAnnotation As New PdfLineAnnotation(New RectangleF(80, 420, 150, 420))
    lineAnnotation.Text = "Line Annotation"
    lineAnnotation.LinePoints = points
    'Create pdf line border
    Dim lineBorder As New LineBorder()
    lineBorder.BorderStyle = PdfBorderStyle.Solid
    lineBorder.BorderWidth = 1
    lineAnnotation.lineBorder = lineBorder
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension
    'Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
    'Assign the line color
    lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
    lineAnnotation.BackColor = New PdfColor(Color.Green)
    'Assign the leader line
    lineAnnotation.LeaderLineExt = 0
    lineAnnotation.LeaderLine = 0
    'Assign the Line caption type
    lineAnnotation.LineCaption = True
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    LineBorder
    PdfLineAnnotation

    PdfLineAnnotation(Int32[])

    Initializes new instance of PdfLineAnnotation class with specified points.

    Declaration
    public PdfLineAnnotation(int[] linePoints)
    Parameters
    Type Name Description
    System.Int32[] linePoints

    The line points is to be drawn.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation and set properties.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points);
    lineAnnotation.Text = "Line Annotation";
    //Create pdf line border
    LineBorder lineBorder = new LineBorder();
    lineBorder.BorderStyle = PdfBorderStyle.Solid;
    lineBorder.BorderWidth = 1;
    lineAnnotation.lineBorder = lineBorder;
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
    //Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default;
    //Assign the line color
    lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
    lineAnnotation.BackColor = new PdfColor(Color.Green);
    //Assign the leader line
    lineAnnotation.LeaderLineExt = 0;
    lineAnnotation.LeaderLine = 0;
    //Assign the Line caption type
    lineAnnotation.LineCaption = true;
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation and set properties.
    Dim lineAnnotation As New PdfLineAnnotation(points)
    lineAnnotation.Text = "Line Annotation"
    'Create pdf line border
    Dim lineBorder As New LineBorder()
    lineBorder.BorderStyle = PdfBorderStyle.Solid
    lineBorder.BorderWidth = 1
    lineAnnotation.lineBorder = lineBorder
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension
    'Assign the line ending style
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
    lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Default
    'Assign the line color
    lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
    lineAnnotation.BackColor = New PdfColor(Color.Green)
    'Assign the leader line
    lineAnnotation.LeaderLineExt = 0
    lineAnnotation.LeaderLine = 0
    'Assign the Line caption type
    lineAnnotation.LineCaption = True
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    LineBorder
    PdfLineAnnotation

    PdfLineAnnotation(Int32[], String)

    Initializes new instance of PdfLineAnnotation class with set of points and annotation text.

    Declaration
    public PdfLineAnnotation(int[] linePoints, string text)
    Parameters
    Type Name Description
    System.Int32[] linePoints

    The line points to be drawn.

    System.String text

    The line caption text of the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new pag .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Create pdf line border
    LineBorder lineBorder = new LineBorder();
    lineBorder.DashArray = 1;
    lineAnnotation.lineBorder = lineBorder;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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 pag .
    Dim page As PdfPage = document.Pages.Add()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Create pdf line border
    Dim lineBorder As New LineBorder()
    lineBorder.DashArray = 1
    lineAnnotation.lineBorder = lineBorder
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    LineBorder
    PdfLineAnnotation

    Fields

    m_captionType

    To specifying Caption Type

    Declaration
    public PdfLineCaptionType m_captionType
    Field Value
    Type Description
    PdfLineCaptionType

    Properties

    BackColor

    Gets or sets the BackgroundColor of the PdfLineAnnotation.

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

    The PdfColor which draws the border of the line annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the line back color.
    lineAnnotation.BackColor = new PdfColor(Color.Green);
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the line back color.
    lineAnnotation.BackColor = New PdfColor(Color.Green)
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    BeginLineStyle

    Gets or sets the style used for the beginning of the line.

    Declaration
    public PdfLineEndingStyle BeginLineStyle { get; set; }
    Property Value
    Type Description
    PdfLineEndingStyle

    A PdfLineEndingStyle enumeration member specifying the begin style for the line.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the begin line style.
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the begin line style.
    lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Butt
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    CaptionType

    Gets or sets the line caption text type of annotation.

    Declaration
    public PdfLineCaptionType CaptionType { get; set; }
    Property Value
    Type Description
    PdfLineCaptionType

    A PdfLineCaptionType enumeration specifying the line caption type.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the line caption type.
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the line caption type.
    lineAnnotation.CaptionType = PdfLineCaptionType.Inline
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    Comments

    Gets the annotation comments

    Declaration
    public PdfPopupAnnotationCollection Comments { get; }
    Property Value
    Type Description
    PdfPopupAnnotationCollection
    Examples
     //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation and set properties.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points);
    lineAnnotation.Text = "Line Annotation";
    //Create pdf line border
    LineBorder lineBorder = new LineBorder();
    lineBorder.BorderStyle = PdfBorderStyle.Solid;
    lineBorder.BorderWidth = 1;
    lineAnnotation.lineBorder = lineBorder;
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
    //set comments
    PdfPopupAnnotation popupComments = new PdfPopupAnnotation();
    popupComments.Author = "TestAuthor";
    popupComments.Text = "Test Text";
    lineAnnotation.Comments.Add(popupComments);
    //Get annotation comments
    PdfPopupAnnotationCollection commentsCollection = lineAnnotation.Comments;
    //Saves the document to disk.
    document.Save("Output.pdf");
    document.Close(true);
    Dim document As PdfDocument = New PdfDocument
    Dim page As PdfPage = document.Pages.Add
    Dim points() As Integer = New Integer() { 80, 420, 150, 420}
    Dim lineAnnotation As PdfLineAnnotation = New PdfLineAnnotation(points)
    lineAnnotation.Text = "Line Annotation"
    Dim lineBorder As LineBorder = New LineBorder
    lineBorder.BorderStyle = PdfBorderStyle.Solid
    lineBorder.BorderWidth = 1
    lineAnnotation.lineBorder = lineBorder
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension
    Dim popupComments As PdfPopupAnnotation = New PdfPopupAnnotation
    popupComments.Author = "TestAuthor"
    popupComments.Text = "Test Text"
    lineAnnotation.Comments.Add(popupComments)
    Dim commentsCollection As PdfPopupAnnotationCollection = lineAnnotation.Comments
    'Saves the document to disk.
    document.Save("Output.pdf")
    document.Close(true)

    EndLineStyle

    Gets or sets the style used for the end of the line.

    Declaration
    public PdfLineEndingStyle EndLineStyle { get; set; }
    Property Value
    Type Description
    PdfLineEndingStyle

    A PdfLineEndingStyle enumeration member specifying the end style for the line.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the line ending style.
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the line ending style.
    lineAnnotation.EndLineStyle = PdfLineEndingStyle.Diamond
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    InnerLineColor

    Gets or sets an InnerColor of the PdfLineAnnotation.

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

    The PdfColor which draws the outline of the inner color of the line annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the inner line color.
    lineAnnotation.InnerLineColor = new PdfColor(Color.Green);
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the inner line color.
    lineAnnotation.InnerLineColor = New PdfColor(Color.Green)
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    LeaderLine

    Gets or sets the leader line

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

    The value specifies the leader line of the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Set the leader line.
    lineAnnotation.LeaderLine = 10;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Set the leader line.
    lineAnnotation.LeaderLine = 10
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    LeaderLineExt

    Gets or sets the LeaderLineExtension.

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

    The value specifies the leader line extension of the annotation.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Set the leader line extension.
    lineAnnotation.LeaderLineExt = 10;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Set the leader line extension.
    lineAnnotation.LeaderLineExt = 10
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    lineBorder

    Gets or sets the border style of the LineAnnotation.

    Declaration
    public LineBorder lineBorder { get; set; }
    Property Value
    Type Description
    LineBorder

    A LineBorder enumeration member specifying the border style for the line.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
     //Set the line border.
    LineBorder lineBorder = new LineBorder();
    lineBorder.DashArray = 1;
    lineAnnotation.lineBorder = lineBorder;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Set the line border.
     Dim lineBorder As LineBorder = New LineBorder()
     lineBorder.DashArray = 1
     lineAnnotation.lineBorder = lineBorder
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    LineCaption

    Gets or sets whether the line annotation caption should be displayed.

    Declaration
    public bool LineCaption { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if the line caption should be displayed, otherwise false.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Set the line caption.
    lineAnnotation.LineCaption = true;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Set the line caption.
    lineAnnotation.LineCaption = True
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    LineIntent

    Gets or sets the LineIntent of the annotation.

    Declaration
    public PdfLineIntent LineIntent { get; set; }
    Property Value
    Type Description
    PdfLineIntent
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(points, "Line Annoation");
    //Sets the line intent.
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(points, "Line Annoation")
    'Sets the line intent.
    lineAnnotation.LineIntent = PdfLineIntent.LineDimension
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    LinePoints

    Gets or sets the LinePoints of the PdfLineAnnotation.

    Declaration
    public int[] LinePoints { get; set; }
    Property Value
    Type Description
    System.Int32[]
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //To specify the line end points
    int[] points = new int[] { 80, 420, 150, 420 };
    //Create a new line annotation.
    PdfLineAnnotation lineAnnotation = new PdfLineAnnotation(new RectangleF(100, 100, 100, 20));
    //Sets the LinePoints.
    lineAnnotation.LinePoints = points;
    //Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation);
    //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()
    'To specify the line end points
    Dim points() As Integer = { 80, 420, 150, 420 }
    'Create a new line annotation.
    Dim lineAnnotation As New PdfLineAnnotation(New RectangleF(100, 100, 100, 20))
    'Sets the LinePoints.
    lineAnnotation.LinePoints = points
    'Add this annotation to a new page.
    page.Annotations.Add(lineAnnotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfDocument
    PdfPage

    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
    LineBorder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved