跳到主要内容

SetSelection

Sets page selection.

Syntax

expression.SetSelection(startPoint, endPoint);

expression - A variable that represents a ApiPage class.

Parameters

NameRequired/OptionalData typeDefaultDescription
startPointRequiredPointNo description provided.
endPointRequiredPointNo description provided.

Returns

boolean

Example

This example selects the text on the page.

let doc = Api.GetDocument();
let page = doc.GetPage(0);
page.SetSelection({x: 10, y: 10}, {x: 100, y: 100});
console.log('We selected the text on the page');