CreateLineAnnot
Creates line annotation.
Syntax
expression.CreateLineAnnot(rect, startPoint, endPoint);
expression - A variable that represents a Api class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| rect | Required | Rect | annotation rect. | |
| startPoint | Required | Point | start line point | |
| endPoint | Required | Point | end line point |
Returns
Example
This example creates a line annotation and adds it to the page.
- Code
- Result
let doc = Api.GetDocument();
let lineAnnot = Api.CreateLineAnnot([10, 10, 160, 32], {x: 11, y: 11}, {x: 155, y: 25});
lineAnnot.SetEndStyle("openArrow");
let page = doc.GetPage(0);
page.AddObject(lineAnnot);