Table of Contents

Class LineBorder

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

Represents the border style of the line annotation.

public class LineBorder
Inheritance
LineBorder
Inherited Members

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.

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.

public PdfBorderStyle BorderStyle { get; set; }

Property Value

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.

public int BorderWidth { get; set; }

Property Value

int

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

public int DashArray { get; set; }

Property Value

int

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)
See Also

See Also