Table of Contents

Class TextElement

Namespace
LMKit.Extraction.Layout
Assembly
LM-Kit.NET.dll

Represents a textual element optionally associated with a bounding box. Suitable for layout-aware text extraction from OCR engines, documents, or other structured sources.

public sealed class TextElement
Inheritance
TextElement
Inherited Members

Constructors

TextElement(string)

Initializes a new instance of the TextElement class with only the text content. Use this constructor when position or layout information is not available or not applicable. Bounding box values will default to 0.

TextElement(string, double, double, double, double)

Initializes a new instance of the TextElement class with the specified text and bounding box coordinates.

TextElement(string, double, double, double, double, int, double, double)

Initializes a new instance of the TextElement class with the specified text and bounding box coordinates, then rotates that box by standardRotation degrees around the center of a page of size pageWidth×pageHeight.

Properties

Height

Gets the height of the bounding box. If no bounding box is available, this value defaults to 0.

Left

Gets the horizontal position of the left edge of the bounding box. If no bounding box is available, this value defaults to 0.

Text

Gets or sets the textual content of this element.

Top

Gets the vertical position of the top edge of the bounding box. If no bounding box is available, this value defaults to 0.

Width

Gets the width of the bounding box. If no bounding box is available, this value defaults to 0.

Methods

Clone()

Creates a deep copy of this TextElement instance.

ToString()