TX Text Control .NET Server

Javascript: Page.getNumberInSection Method

Method|Introduced in 28.0

Description

Gets the page number relative to the beginning of the section the page belongs to.

Syntax

<void> Page.getNumberInSection(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the page number relative to the beginning of the section the page belongs to.

errorCallback

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

Examples

The following example demonstrates Page.getNumberInSection in a practical document-editing workflow. It gets the page number relative to the beginning of the section the page belongs to.

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

function inspectNumberInSection(page) {
    page.getNumberInSection(
        function(result) {
            console.log("get number in section result:", result);
        },
        onTxError
    );
}