DS Server

PageMargins Object

Object|Introduced in 26.0

Description

Represents the page margins of a document or document section. The measure depends on the page's unit.

Syntax

PageMargins

Examples

The following example demonstrates PageMargins in a practical document-editing workflow. It represents the page margins of a document or document section. The measure depends on the page's unit.

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

TXTextControl.pageMargins.getBottom(
    function(result) {
        console.log("get bottom result:", result);
    },
    onTxError
);

Members

Methods

MethodDescription
getBottomGets the bottom margin of a TX Text Control document or document section.
getLeftGets the left margin of a TX Text Control document or document section.
getRightGets the right margin of a TX Text Control document or document section.
getTopGets the top margin of a TX Text Control document or document section.
setBottomSets the bottom margin of a TX Text Control document or document section.
setLeftSets the left margin of a TX Text Control document or document section.
setRightSets the right margin of a TX Text Control document or document section.
setTopSets the top margin of a TX Text Control document or document section.

Enumerations

EnumerationDescription
AttributeDetermines a certain page margins attribute.