TextSearchOptions

TextSearchOptions

Overview

TextSearchOptions is a class in Aspose.PDF FOSS for .NET.

Options for text search operations in PDF documents.

This class provides 4 methods for working with TextSearchOptions objects in .NET programs. Available methods include: TextSearchOptions. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: CaseSensitive, IgnoreResourceFontErrors, IgnoreShadowText, IsRegularExpression, IsRegularExpressionUsed, LimitToPageBounds, and 7 more.

Properties

NameTypeAccessDescription
IsRegularExpressionboolRead/WriteGets or sets whether the search phrase is a regular expression.
CaseSensitiveboolRead/WriteGets or sets whether the search is case-sensitive.
WholeWordboolRead/WriteGets or sets whether to match whole words only.
RectangleRectangle?Read/WriteGets or sets a rectangle to limit the text search area.
IsRegularExpressionUsedboolRead/WriteAlias for IsRegularExpression (matches .NET Aspose.PDF API).
LimitToPageBoundsboolRead/WriteGets or sets whether text search is limited to page boundaries.
SearchForTextRelatedGraphicsboolRead/WriteGets or sets whether text-search results should also collect graphics (lines, rectangles, fills) positionally related to the matched text — for example the underline of a hyperlink or the highlight rectangle around a phrase.
IgnoreResourceFontErrorsboolRead/WriteWhen true, the absorber suppresses exceptions raised by malformed or missing font resources during page traversal — the offending text run is silently skipped instead of bubbling up.
SearchInAnnotationsboolRead/WriteWhether annotation-bound text contributes to search results.
IgnoreShadowTextboolRead/WriteWhether text drawn off-page or behind opaque shapes is ignored.
UseFontEngineEncodingboolRead/WriteWhether the font engine’s encoding tables drive decoding instead of /ToUnicode.
LogTextExtractionErrorsboolRead/WriteWhether text-extraction errors are routed through the document logger.
StoredGraphicElementsMaxCountintRead/WriteMaximum number of graphics elements retained by the absorber alongside matched text.

Methods

SignatureDescription
TextSearchOptions()Initializes a new instance of the TextSearchOptions class.
TextSearchOptions(isRegularExpressionUsed: bool)Initializes a new instance of the TextSearchOptions class with the specified regular expression mode.
TextSearchOptions(rectangle: Rectangle)Initializes a new instance of the TextSearchOptions class constraining the search to a rectangle in page space.
TextSearchOptions(rectangle: Rectangle, isRegularExpressionUsed: bool)Initializes a new instance constraining the search to a rectangle and optionally treating the phrase as a regular expression.

See Also