Class LineBorder
Represents the border style of the line annotation.
Inheritance
System.Object
LineBorder
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class LineBorder : IPdfWrapper
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.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 Annotation")
'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)
Constructors
LineBorder()
Initializes a new instance of the LineBorder class.
Declaration
public LineBorder()
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;
//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 Annotation")
'Create pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.BorderStyle = PdfBorderStyle.Solid
lineBorder.BorderWidth = 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
Properties
BorderStyle
Gets or sets the border style.
Declaration
public PdfBorderStyle BorderStyle { get; set; }
Property Value
Type | Description |
---|---|
PdfBorderStyle | The PdfBorderStyle Specifies the available styles for a field border |
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;
//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 Annotation")
'Create pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.BorderStyle = PdfBorderStyle.Solid
lineBorder.BorderWidth = 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
BorderWidth
Gets or sets the width of the line border.
Declaration
public int BorderWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The width of the line border. |
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.DashArray = 1;
lineAnnotation.lineBorder = lineBorder;
lineAnnotation.lineBorder.BorderWidth = 4;
//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 Annotation")
'Create pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.DashArray = 1
lineAnnotation.lineBorder = lineBorder
lineAnnotation.lineBorder.BorderWidth = 4
'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
DashArray
Gets or sets the line dash of the annotation
Declaration
public int DashArray { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The dash array of the line border. |
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;
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 Annotation")
'Create pdf line border.
Dim lineBorder As New LineBorder()
lineBorder.BorderStyle = PdfBorderStyle.Solid
lineBorder.BorderWidth = 1
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)