Class
TextSearch

Performs forward and backward text searches over a fixed document using KMP or regular expression strategies with whole-word and case sensitivity options.

Definition

Namespace:Telerik.Windows.Documents.Fixed.Search

Assembly:Telerik.Windows.Documents.Fixed.dll

Syntax:

cs-api-definition
public class TextSearch

Inheritance: objectTextSearch

Constructors

TextSearch(RadFixedDocument)

Initializes a search context for the specified fixed document, preparing page text using the provided recognizer.

Declaration

cs-api-definition
public TextSearch(RadFixedDocument fixedDocument)

Parameters

fixedDocument

RadFixedDocument

The PDF document to be searched.

Methods

Find(string, TextSearchOptions)

Finds the next occurrence of the specified text starting from the internal search cursor and returns its range.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options)

Parameters

text

string

The searched text.

options

TextSearchOptions

Allows you to specify the search options.

Returns

SearchResult

The SearchResult.

Find(string, TextSearchOptions, TextPosition)

Finds the next occurrence of the specified text starting from a provided position.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The searched text.

options

TextSearchOptions

Allows you to specify the search options.

startPosition

TextPosition

The initial position to start the search from.

Returns

SearchResult

The SearchResult.

Find(string, TextSearchOptions, TextRange)

Finds the next occurrence within the specified forward range.

Declaration

cs-api-definition
public SearchResult Find(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The searched text.

options

TextSearchOptions

Allows you to specify the search options.

range

TextRange

The range within the search is performed

Returns

SearchResult

The SearchResult.

FindAll(string, TextSearchOptions)

Finds all occurrences of the text throughout the document starting at the beginning.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options)

Parameters

text

string

The searched text.

options

TextSearchOptions

The search options to apply for the current search.

Returns

IEnumerable<SearchResult>

A collection of the found results.

FindAll(string, TextSearchOptions, TextPosition)

Finds all occurrences starting from the provided position and continuing forward.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The searched text.

options

TextSearchOptions

The search options to apply for the current search.

startPosition

TextPosition

The position from which to start the search.

Returns

IEnumerable<SearchResult>

A collection of the found results.

FindAll(string, TextSearchOptions, TextRange)

Finds all occurrences inside the specified range using the configured strategy.

Declaration

cs-api-definition
public IEnumerable<SearchResult> FindAll(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The searched text.

options

TextSearchOptions

The search options to apply for the current search.

range

TextRange

The range to search in.

Returns

IEnumerable<SearchResult>

A collection of the found results.

FindPrevious(string, TextSearchOptions)

Finds the previous occurrence of the specified text relative to the internal cursor.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options)

Parameters

text

string

The text to be searched.

options

TextSearchOptions

The search options to apply for the current search.

Returns

SearchResult

The SearchResult.

FindPrevious(string, TextSearchOptions, TextPosition)

Finds the previous occurrence starting from the provided position.

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options, TextPosition startPosition)

Parameters

text

string

The text to be searched.

options

TextSearchOptions

The search options to apply for the current search.

startPosition

TextPosition

The position to begin from.

Returns

SearchResult

The SearchResult.

FindPrevious(string, TextSearchOptions, TextRange)

Finds the previous occurrence within the specified backward range (start greater than end).

Declaration

cs-api-definition
public SearchResult FindPrevious(string text, TextSearchOptions options, TextRange range)

Parameters

text

string

The text to be searched.

options

TextSearchOptions

The search options to apply for the current search.

range

TextRange

The range of the search - StartPosition is greater than EndPosition.

Returns

SearchResult

The SearchResult.