Line Object
Description
The Line object represents a single line in a document.
Syntax
LineExamples
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
| Method | Description |
|---|---|
| getBaseline | Gets the line's baseline position. |
| getLength | Gets the number of characters in the line including the break character. |
| getNumber | Gets the line's number. |
| getPage | Gets the number of the page to which the line belongs. |
| getStart | Gets the number (one-based) of the first character in the line. |
| getText | Gets the line's text. |
| getTextBounds | Gets the bounding rectangle of the text belonging to the line. |
| save | Saves the line in a certain format and sends the result back asynchronously by calling a given callback function. |