Method FindInRegion
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
pagePageElementThe page to search. Must not be
null.regionRectangleThe region (in page coordinates) to filter by.
optionsRegionSearchOptionsRegion search options (intersection vs containment, merge behavior). May be
nullfor defaults.
Returns
- List<TextMatch>
An enumeration of TextMatch objects, typically one per line or merged group inside the region.
Exceptions
- ArgumentNullException
Thrown when
pageisnull.
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
pagesIEnumerable<PageElement>Pages to search. Must not be
null.regionRectangleThe region (interpreted per page) to filter by.
optionsRegionSearchOptionsRegion search options. May be
nullfor defaults.
Returns
Exceptions
- ArgumentNullException
Thrown when
pagesisnull.