HelpBot Assistant

How can I help you?

PdfBorderEffect

6 Feb 20261 minute to read

PdfBorderEffect class represents the border effects 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: PdfSquareAnnotation = page.annotations.at(0) as PdfSquareAnnotation;
// Initializes a new instance of the `PdfBorderEffect` class.
let borderEffect: PdfBorderEffect = new PdfBorderEffect();
// Sets the intensity of the annotation border.
borderEffect.intensity = 2;
// Sets the effect style of the annotation border.
borderEffect.style = PdfBorderEffectStyle.cloudy;
// Sets border effect to the annotation.
annotation.borderEffect = borderEffect;
// Destroy the document
document.destroy();

Properties

Get intensity number

Gets the intensity of the annotation border.

Set intensity void

Sets the intensity of the annotation border.

Parameter Type Description
value number Intensity.

Get style PdfBorderEffectStyle

Gets the effect style of the annotation border.

Set style void

Sets the effect style of the annotation border.

Parameter Type Description
value PdfBorderEffectStyle Effect style.