DS Server

Javascript: ParagraphFormat.getFrameDistance Method

Method|Introduced in 26.0

Description

Gets the distance, in twips, between the text and the paragraph's frame.

Syntax

<void> ParagraphFormat.getFrameDistance(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the distance, in twips, between the text and the paragraph's frame.

errorCallback

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

Examples

The following example demonstrates ParagraphFormat.getFrameDistance in a practical document-editing workflow. It gets the distance, in twips, between the text and the paragraph's frame.

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

TXTextControl.paragraphFormat.getFrameDistance(
    function(result) {
        console.log("get frame distance result:", result);
    },
    onTxError
);