How can I help you?
PdfAnnotationBorder
6 Feb 20263 minutes to read
PdfAnnotationBorder class represents the border properties of annotations.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Get the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Get the first annotation of the page
let annotation: PdfLineAnnotation = page.annotations.at(0) as PdfLineAnnotation;
// Initializes a new instance of the `PdfAnnotationBorder` class.
let border: PdfAnnotationBorder = new PdfAnnotationBorder();
//Sets the width of the annotation border.
border.width = 10;
//Sets the style of the annotation border.
border.style = PdfBorderStyle.dashed;
//Sets the dash pattern of the annotation border.
border.dash = [1, 2, 1];
// Sets the border to the PDF form field
annotation.border = border;
// Destroy the document
document.destroy();Properties
Get dash Array
Gets the dash pattern of the field border.
Set dash void
Sets the dash pattern of the field border.
| Parameter | Type | Description |
|---|---|---|
| value | Array |
Dash pattern. |
Get hRadius number
Gets the horizontal radius of the annotation border.
Set hRadius void
Sets the horizontal radius of the annotation border.
| Parameter | Type | Description |
|---|---|---|
| value | number |
Horizontal radius. |
Get style PdfBorderStyle
Gets the border line style of the field border.
Set style void
Sets the border line style of the field border.
| Parameter | Type | Description |
|---|---|---|
| value | PdfBorderStyle |
Border style. |
Get vRadius number
Gets the vertical radius of the annotation border.
Set vRadius void
Sets the vertical radius of the annotation border.
| Parameter | Type | Description |
|---|---|---|
| value | number |
Vertical radius. |
Get width number
Gets the width of the annotation border.
Set width void
Sets the width of the annotation border.
| Parameter | Type | Description |
|---|---|---|
| value | number |
Width. |