[]
A free text annotation displays text directly on the page. Unlike text annotations, free text annotations do not have an open or closed state. The text remains visible on the page instead of appearing in a pop‑up window.

Use the FreeTextAnnotation class to add free text annotations to a PDF document.
const doc = new PdfDocument();
const page = doc.newPage();
const rc = { x: 50, y: 50, width: 200, height: 50 };
const layout = new Layout({
runs: [{
text: "A blue free text annotation is placed below and to the right, " +
"with a callout going from it to this note",
font: Font.getPdfFont(StandardPdfFont.Times),
fontSize: 11
}],
maxWidth: rc.width,
maxHeight: rc.height
});
page.context.drawLayout(layout, rc.x, rc.y);
//Create an instance of FreeTextAnnotation class and set its relevant properties
var freeAnnot = new FreeTextAnnotation();
freeAnnot.rect = { x: rc.x + rc.width + 18, y: rc.y + rc.height + 9, width: 72 * 2, height: 72 };
freeAnnot.calloutLine = [
{ x: rc.x + rc.width / 2, y: rc.y + rc.height },
{ x: rc.x + rc.width / 2, y: rc.y + rc.height + 9 + 36 },
{ x: rc.x + rc.width + 18, y: rc.y + rc.height + 9 + 36 }
];
freeAnnot.lineWidth = 1;
freeAnnot.lineEndStyle = LineEndingStyle.OpenArrow;
freeAnnot.lineDashPattern = [8, 4];
freeAnnot.contents = "This is a free text annotation with a callout line going to the note on the left.";
freeAnnot.color = "LightSkyBlue";
page.annotations.add(freeAnnot); //Add the free text annotation
const docData = doc.savePdf();
Util.saveFile("FreeTextAnnotation.pdf", docData);