Table of Contents

Method FindInRegion

Namespace
LMKit.Document.Search
Assembly
LM-Kit.NET.dll

FindInRegion(PageElement, Rectangle, RegionSearchOptions)

Returns text matches within a geometric region. You can choose intersection or containment semantics and whether to merge adjacent elements.

public List<TextMatch> FindInRegion(PageElement page, Rectangle region, RegionSearchOptions options = null)

Parameters

page PageElement

The page to search. Must not be null.

region Rectangle

The region (in page coordinates) to filter by.

options RegionSearchOptions

Region search options (intersection vs containment, merge behavior). May be null for defaults.

Returns

List<TextMatch>

An enumeration of TextMatch objects, typically one per line or merged group inside the region.

Exceptions

ArgumentNullException

Thrown when page is null.

FindInRegion(IEnumerable<PageElement>, Rectangle, RegionSearchOptions)

Returns text matches found within the same region (in each page's coordinate space) across multiple pages. The same region rectangle is applied to each page independently (page-local coordinates).

public List<TextMatch> FindInRegion(IEnumerable<PageElement> pages, Rectangle region, RegionSearchOptions options = null)

Parameters

pages IEnumerable<PageElement>

Pages to search. Must not be null.

region Rectangle

The region (interpreted per page) to filter by.

options RegionSearchOptions

Region search options. May be null for defaults.

Returns

List<TextMatch>

Region matches across pages with (TextMatch) with PageIndex set.

Exceptions

ArgumentNullException

Thrown when pages is null.