DS Server

Javascript: SectionFormat.setColumns Method

Method|Introduced in 26.0

Description

Sets the number of columns on a page.

Syntax

<void> SectionFormat.setColumns(<number> columns, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
columns

The number of columns on a page.

callback

Optional. Is called when the operation completed.

errorCallback

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

Examples

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

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

function configureColumns(sectionFormat) {
    sectionFormat.setColumns(
        3,
        function() {
            console.log("set columns completed.");
        },
        onTxError
    );
}