Table of Contents

Class PdfLoadedLineAnnotation

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded line annotation class.

public class PdfLoadedLineAnnotation : PdfLoadedStyledAnnotation, INotifyPropertyChanged
Inheritance
PdfLoadedLineAnnotation
Implements
Inherited Members

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
int[] points = new int[] { 100, 100, 200, 100 };
//Create a new PDF line border.
LineBorder lineBorder = new LineBorder();
lineBorder.BorderStyle = PdfBorderStyle.Solid;
lineBorder.DashArray = 1;
lineBorder.BorderWidth =3;
lineBorder.DashArray = 8;
//Sets the line border.
lineAnnotation.LineBorder = lineBorder;
//Sets the line indent.
lineAnnotation.LineIntent = PdfLineIntent.LineArrow;
//Assign the line ending style
lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash;
lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle;
lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Locked;
//Assign the line color
lineAnnotation.InnerLineColor = new PdfColor(Color.Blue);
lineAnnotation.BackColor = new PdfColor(Color.Red);
//Assign the leader line
lineAnnotation.LeaderExt = 20;
lineAnnotation.LeaderLine = 20;
lineAnnotation.Size = new SizeF(100, 200);
//Assign the line caption
lineAnnotation.LineCaption = true;
lineAnnotation.Text = "Syncfusion";
lineAnnotation.CaptionType = PdfLineCaptionType.Top;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
Dim points As Integer() = { 100, 100, 200, 100 }
'Create a new pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.BorderStyle = PdfBorderStyle.Solid
lineBorder.DashArray = 1
lineBorder.BorderWidth = 3
lineBorder.DashArray = 8
'Sets the line border
lineAnnotation.LineBorder = lineBorder
'Sets the line indent
lineAnnotation.LineIntent = PdfLineIntent.LineArrow
'Assign the line ending style
lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash
lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle
lineAnnotation.AnnotationFlags = PdfAnnotationFlags.Locked
'Assign the line color
lineAnnotation.InnerLineColor = New PdfColor(Color.Blue)
lineAnnotation.BackColor = New PdfColor(Color.Red)
'Assign the leader line
lineAnnotation.LeaderExt = 20
lineAnnotation.LeaderLine = 20
lineAnnotation.Size = New SizeF(100, 200)
'Assign the line caption
lineAnnotation.LineCaption = True
lineAnnotation.Text = "Syncfusion"
lineAnnotation.CaptionType = PdfLineCaptionType.Top
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)

Properties

BackColor

Gets or sets the back color of the annotation.

public PdfColor BackColor { get; set; }

Property Value

PdfColor

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Sets the line annotation back color.
lineAnnotation.BackColor = new PdfColor(Color.Red);
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Sets the line annotation back color
lineAnnotation.BackColor = New PdfColor(Color.Red)
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

BeginLineStyle

Gets or sets the begin line style of the annotation.

public PdfLineEndingStyle BeginLineStyle { get; set; }

Property Value

PdfLineEndingStyle

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the line ending style
lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the line ending style
lineAnnotation.BeginLineStyle = PdfLineEndingStyle.Slash
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

CaptionType

Gets or sets the caption type of the annotation.

public PdfLineCaptionType CaptionType { get; set; }

Property Value

PdfLineCaptionType

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Sets the line caption type.
lineAnnotation.CaptionType = PdfLineCaptionType.Top;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Sets the line caption type.
lineAnnotation.CaptionType = PdfLineCaptionType.Top
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

Comments

Gets the annotation Comments history.

public PdfLoadedPopupAnnotationCollection Comments { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The Comments collection of the line annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfLineAnnotation
PdfLoadedLineAnnotation  line = document.Pages[0].Annotations[0] as PdfLoadedLineAnnotation;
//Get the Comments collection
PdfLoadedPopupAnnotationCollection CommentsCollection = line.Comments;
//save the document
document.Save("LineAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfFreeTextAnnotation
Dim line As PdfLoadedLineAnnotation = document.Pages(0).Annotations(0)
'Get the Comments collection
Dim CommentsCollection As PdfLoadedPopupAnnotationCollection = line.Comments
'save the document
document.Save("LineAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

EndLineStyle

Gets or sets the end line style of the annotation.

public PdfLineEndingStyle EndLineStyle { get; set; }

Property Value

PdfLineEndingStyle

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the line ending style
lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the line ending style
lineAnnotation.EndLineStyle = PdfLineEndingStyle.Circle
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

InnerLineColor

Gets or sets the inner line color of the annotation.

public PdfColor InnerLineColor { get; set; }

Property Value

PdfColor

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the line color
lineAnnotation.InnerLineColor = new PdfColor(Color.Blue);
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the line color
lineAnnotation.InnerLineColor = New PdfColor(Color.Blue)
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LeaderExt

Gets or sets the leader ext of the annotation.

public int LeaderExt { get; set; }

Property Value

int

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the leader line
lineAnnotation.LeaderExt = 20;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the leader line
lineAnnotation.LeaderExt = 20
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LeaderLine

Gets or sets the leader line of the annotation.

public int LeaderLine { get; set; }

Property Value

int

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Sets the leader line.
lineAnnotation.LeaderLine = 20;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Sets the leader line.
lineAnnotation.LeaderLine = 20
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LeaderOffset

Gets or sets the leader offset of the annotation.

public int LeaderOffset { get; set; }

Property Value

int

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the leader Offset
lineAnnotation.LeaderOffset = 20;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the leader Offset
lineAnnotation.LeaderOffset = 20
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LineBorder

Gets the line border of the annotation.

public LineBorder LineBorder { get; set; }

Property Value

LineBorder

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Create a new pdf line border.
LineBorder lineBorder = new LineBorder();
lineBorder.BorderStyle = PdfBorderStyle.Solid;
lineBorder.DashArray = 1;
lineBorder.BorderWidth =3;
lineBorder.DashArray = 8;
lineAnnotation.LineBorder = lineBorder;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Create a new pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.BorderStyle = PdfBorderStyle.Solid
lineBorder.DashArray = 1
lineBorder.BorderWidth = 3
lineBorder.DashArray = 8
lineAnnotation.LineBorder = lineBorder
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True);
See Also

LineCaption

Gets or sets the line caption of the annotation.

public bool LineCaption { get; set; }

Property Value

bool

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Assign the line caption
lineAnnotation.LineCaption = true;
lineAnnotation.CaptionType = PdfLineCaptionType.Top;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Assign the line caption
lineAnnotation.LineCaption = True
lineAnnotation.CaptionType = PdfLineCaptionType.Top
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LineIntent

Gets or sets the line intent of the annotation.

public PdfLineIntent LineIntent { get; set; }

Property Value

PdfLineIntent

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
lineAnnotation.LineIntent = PdfLineIntent.LineArrow;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
lineAnnotation.LineIntent = PdfLineIntent.LineArrow
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

LinePoints

Gets or sets the line points of the annotation.

public int[] LinePoints { get; set; }

Property Value

int[]

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedLineAnnotation lineAnnotation = document.Pages[1].Annotations[5] as PdfLoadedLineAnnotation;
//Get the line points
int[] linePoints = lineAnnotation.LinePoints;
//Save the document.
document.Save("lineAnnotation.pdf");
document.Close(true);
  'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim lineAnnotation As PdfLoadedLineAnnotation = document.Pages(1).Annotations(5)
'Get the line points
Dim linePoints As Integer() = lineAnnotation.LinePoints
'Save the document.
document.Save("lineAnnotation.pdf")
document.Close(True)
See Also

ReviewHistory

Gets the annotation review history.

public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }

Property Value

PdfLoadedPopupAnnotationCollection

The review collection of the line annotation.

Examples

//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Load the existing PdfLineAnnotation
PdfLoadedLineAnnotation  line = document.Pages[0].Annotations[0] as PdfLoadedLineAnnotation;
//Get the review collection
PdfLoadedPopupAnnotationCollection reviewCollection = line.ReviewHistory;
//save the document
document.Save("LineAnnotation.pdf");
//Close the docuemnt
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Load the existing PdfFreeTextAnnotation
Dim line As PdfLoadedLineAnnotation = document.Pages(0).Annotations(0)
'Get the review collection
Dim reviewCollection As PdfLoadedPopupAnnotationCollection = line.ReviewHistory
'save the document
document.Save("LineAnnotation.pdf")
'Close the document.
document.Close(True)
See Also

Methods

Save()

Saves an annotation .

protected override void Save()
See Also

See Also