TX Text Control .NET Server

Line Object

Object|Introduced in 28.0

Description

The Line object represents a single line in a document.

Syntax

Line

Examples

The following example demonstrates Line in a practical document-editing workflow. The Line object represents a single line in a document.

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

function inspectLine(line) {
    line.getText(
        function(result) {
            console.log("get text result:", result);
        },
        onTxError
    );
}

Members

Methods

MethodDescription
getBaselineGets the line's baseline position.
getLengthGets the number of characters in the line including the break character.
getNumberGets the line's number.
getPageGets the number of the page to which the line belongs.
getStartGets the number (one-based) of the first character in the line.
getTextGets the line's text.
getTextBoundsGets the bounding rectangle of the text belonging to the line.
saveSaves the line in a certain format and sends the result back asynchronously by calling a given callback function.