DS Server

Javascript: ParagraphFormat.getPageBreakBefore Method

Method|Introduced in 26.0

Description

Gets whether the paragraph is always displayed on top of a page.

Syntax

<void> ParagraphFormat.getPageBreakBefore(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives whether the paragraph is always displayed on top of a page.

errorCallback

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

Examples

The following example demonstrates ParagraphFormat.getPageBreakBefore in a practical document-editing workflow. It gets whether the paragraph is always displayed on top of a page.

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

TXTextControl.paragraphFormat.getPageBreakBefore(
    function(result) {
        if (result) {
            console.log("get page break before is available.");
        } else {
            console.warn("get page break before is not available in the current document state.");
        }
    },
    onTxError
);