/ PDF / PdfBorderEffect
Search results

PdfBorderEffect API in JavaScript PDF API control

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

intensity number

Gets the intensity of the annotation border.

style PdfBorderEffectStyle

Gets the effect style of the annotation border.