SetPathList
Sets ink path list.
Syntax
expression.SetPathList(inkPaths);
expression - A variable that represents an ApiInkAnnotation class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| inkPaths | Required | PathList | ink path list |
Returns
boolean
Example
Set the path list of an ink annotation in a PDF.
// Useful for changing the lines that make up an ink drawing in a PDF.
// Replace the path coordinates for an ink annotation in a PDF.
let doc = Api.GetDocument();
let inkPaths = [[{x: 328.002, y: 222.017}, {x: 328.648, y: 222.017}, {x: 329.294, y: 222.017}]];
let inkAnnot = Api.CreateInkAnnot([10, 10, 160, 32], inkPaths);
inkAnnot.SetBorderColor(Api.RGB(255, 0, 0));
inkAnnot.SetPathList([[{x: 10, y: 10}, {x: 50, y: 50}]]);
let page = doc.GetPage(0);
page.AddObject(inkAnnot);
console.log("We set path list to ink annot");