DS Server

SectionFormat Object

Object|Introduced in 26.0

Description

Represents the formatting attributes of a section.

Syntax

SectionFormat

Examples

The following example demonstrates SectionFormat in a practical document-editing workflow. It represents the formatting attributes of a section.

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

function inspectSectionFormat(sectionFormat) {
    sectionFormat.getBreakKind(
        function(breakKind) {
            if (!breakKind) {
                console.warn("No section break kind was returned.");
                return;
            }
            
            console.log("get break kind result:", breakKind);
        },
        onTxError
    );
}

Members

Properties

PropertyDescription
pageBorderGets the attributes of a section's page border.
pageMarginsGets the section's page margins.
pageSizeGets the section's page size.

Methods

MethodDescription
getBreakKindGets the kind of the section break the section starts with.
getColumnDistancesGets the distances, in twips, between the columns on a page.
getColumnLineColorGets the color of a dividing line between two columns.
getColumnLineWidthGets the width of a dividing line between two columns. If this property's value is zero there is no dividing line. Otherwise it is a value in twips.
getColumnsGets the number of columns on a page.
getColumnWidthsGets the widths, in twips, of the columns on a page.
getEqualColumnWidthGets a value indicating whether the columns on a page have all the same width and the same distance between them. If this property is set to true, the width of the columns are automatically calculated from the page size.
getLandscapeGets a value indicating whether the section's page size is in landscape orientation.
getRestartPageNumberingGets a value indicating whether page numbering is restarted at the section's beginning.
setBreakKindSets the kind of the section break the section starts with.
setColumnLineColorSets the color of a dividing line between two columns.
setColumnLineWidthSets the width of a dividing line between two columns. If this property's value is zero there is no dividing line. Otherwise it is a value in twips.
setColumnsSets the number of columns on a page.
setColumnWidthsSets the widths, in twips, of the columns on a page.
setEqualColumnWidthSets a value indicating whether the columns on a page have all the same width and the same distance between them. If this property is set to true, the width of the columns are automatically calculated from the page size.
setLandscapeSets a value indicating whether the section's page size is in landscape orientation.
setRestartPageNumberingSets a value indicating whether page numbering is restarted at the section's beginning.

Enumerations

EnumerationDescription
AttributeDetermines a certain section format attribute.