Class PdfLoadedLineAnnotation
Represents the loaded line annotation class.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfLoadedLineAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
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.
Declaration
public PdfColor BackColor { get; set; }
Property Value
Type |
---|
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.
Declaration
public PdfLineEndingStyle BeginLineStyle { get; set; }
Property Value
Type |
---|
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.
Declaration
public PdfLineCaptionType CaptionType { get; set; }
Property Value
Type |
---|
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.
Declaration
public PdfLoadedPopupAnnotationCollection Comments { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public PdfLineEndingStyle EndLineStyle { get; set; }
Property Value
Type |
---|
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.
Declaration
public PdfColor InnerLineColor { get; set; }
Property Value
Type |
---|
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.
Declaration
public int LeaderExt { get; set; }
Property Value
Type |
---|
System.Int32 |
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.
Declaration
public int LeaderLine { get; set; }
Property Value
Type |
---|
System.Int32 |
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.
Declaration
public int LeaderOffset { get; set; }
Property Value
Type |
---|
System.Int32 |
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.
Declaration
public LineBorder LineBorder { get; set; }
Property Value
Type |
---|
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.
Declaration
public bool LineCaption { get; set; }
Property Value
Type |
---|
System.Boolean |
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.
Declaration
public PdfLineIntent LineIntent { get; set; }
Property Value
Type |
---|
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.
Declaration
public int[] LinePoints { get; set; }
Property Value
Type |
---|
System.Int32[] |
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.
Declaration
public PdfLoadedPopupAnnotationCollection ReviewHistory { get; }
Property Value
Type | Description |
---|---|
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 .
Declaration
protected override void Save()