Javascript: Line.getPage Method
Description
Gets the number of the page to which the line belongs.
Syntax
<void> Line.getPage(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the number of the page to which the line belongs. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates Line.getPage in a practical document-editing workflow. It gets the number of the page to which the line belongs.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectPage(line) {
line.getPage(
function(result) {
console.log("get page result:", result);
},
onTxError
);
}