DS Server

Javascript: SectionFormat.getColumns Method

Method|Introduced in 26.0

Description

Gets the number of columns on a page.

Syntax

<void> SectionFormat.getColumns(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the number of columns on a page.

errorCallback

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

Examples

The following example demonstrates SectionFormat.getColumns in a practical document-editing workflow. It gets the number of columns on a page.

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

function inspectColumns(sectionFormat) {
    sectionFormat.getColumns(
        function(result) {
            console.log("get columns result:", result);
        },
        onTxError
    );
}