Method DetectLines
DetectLines()
Detects and groups TextElement instances into reading-order text lines.
public List<LineElement> DetectLines()
Returns
- List<LineElement>
A list of LineElement objects in reading order, positioned in the page’s original coordinate space.
Remarks
This method performs geometry-driven line detection in a normalized “view space” (deskewed and de-rotated) for robustness, then remaps the result back to the page’s original coordinate system before returning.
If no layout information is available (i.e., all elements have non-positive height), the method returns a single LineElement containing all text elements in their current order.
Results are cached internally for performance and invalidated when the page content or geometry changes (e.g., size update, rotation, deskew). Each call returns a fresh list; the returned LineElement instances reference the underlying original TextElement objects.