DS Server

Javascript: PageBorder.getMeasureFromText Method

Method|Introduced in 26.0

Description

Gets whether the page border's distances are measured from the text.

Syntax

<void> PageBorder.getMeasureFromText(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives whether the page border's distances are measured from the text.

errorCallback

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

Examples

The following example demonstrates PageBorder.getMeasureFromText in a practical document-editing workflow. It gets whether the page border's distances are measured from the text.

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

function inspectMeasureFromText(pageBorder) {
    pageBorder.getMeasureFromText(
        function(result) {
            if (result) {
                console.log("get measure from text is available.");
            } else {
                console.warn("get measure from text is not available in the current document state.");
            }
        },
        onTxError
    );
}