Indicates one of the bounds of the Find Text operation.
A DocumentViewerTextPosition object indicating the page number and index of the top of the text search. The default value is null, which indicates the top of the first page of the document.
If EndPosition is found to be "greater than" BeginPosition - meaning a higher page number or character index - the search will be conducted in the "forward" direction, incrementing through the character indices and pages from BeginPosition to EndPosition. Otherwise, the search will be conducted in a "backward" direction, decrementing through the pages and character indices, but still from the BeginPosition to the EndPosition. Thus, to change direction between calls to DocumentViewerText.Find, swap the two properties.
Since a page's text may not yet be parsed when the search bounds are being selected, both BeginPosition and EndPosition can take
-1 as the value forDocumentViewerTextPosition.CharacterIndex. This value will be internally resolved to the index of the final character of the page if and when the page's text is retrieved. If DocumentViewerText.AutoGetText is false, the
-1 will not resolve to a real index and the search will return no results for that page.
Search from start to EndPosition.
The default value is null, meaning the top of page 1.
For more information, refer to DocumentViewerText.Find.
For an example, refer to DocumentViewerText.Find.