DS Server

Javascript: InputPosition.getPageInSection Method

Method|Introduced in 28.0

Description

Gets the page number in the section containing the current text input position.

Syntax

<void> InputPosition.getPageInSection(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the page number in the section containing the current text input position.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates InputPosition.getPageInSection in a practical document-editing workflow. It gets the page number in the section containing the current text input position.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.inputPosition.getPageInSection(
    function(result) {
        console.log("get page in section result:", result);
    },
    onTxError
);