跳到主要内容

GetAllAnnots

Gets all annots on page

Syntax

expression.GetAllAnnots();

expression - A variable that represents a ApiPage class.

Parameters

This method doesn't have any parameters.

Returns

ApiBaseAnnotation

Example

This example gets all annots from page.

let doc = Api.GetDocument();
let freeTextAnnot = Api.CreateFreeTextAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(freeTextAnnot);

let annots = page.GetAllAnnots();
annots[0].SetPosition({x: 30, y: 30});