DS Server

Section Object

Object|Introduced in 28.0

Description

Represents a section of a document. Sections are numbered from the beginning to the end of the document beginning with 1. A document has at least one section. A section is a part of the document that specifies the page size, the page margins and the headers and footers. A section can be obtained from the section collection.

Syntax

Section

Examples

The following example demonstrates Section in a practical document-editing workflow. It represents a section of a document. Sections are numbered from the beginning to the end of the document beginning with 1. A document has at least one section. A section is a part of the document that specifies the page size, the page margins and the headers and footers. A section can be obtained from the section collection.

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

function inspectSection(section) {
    section.getLength(
        function(result) {
            console.log("get length result:", result);
        },
        onTxError
    );
}

Members

Properties

PropertyDescription
formatThe section's formatting attributes.
headersAndFootersThe section's headers and footers.

Methods

MethodDescription
getLengthGets the number of characters in the section.
getNumberGets the section's number.
getStartGets the number (one-based) of the first character in the section.
selectSelects the section.

Further Reading