Click or drag to resize

searchText Method

Search the document currently open in the PdfWebControl instance.

Syntax
JavaScript
function searchText(terms, previous);

Parameters

terms

Type: String

Search terms, delimited with a space.

previous

Type: Boolean

If true, the search will be preformed backwards from the current search position (or from the top of the current page if there is no current position).

If false, the search will be preformed forward from the current search position (or from the top of the current page if there is no current position).

Return Value

Type: Boolean

Returns true if successful.

Returns false if document can not be searched.

Remarks

Calling this method with the same search terms multiple times will move through all search results. Searchs are case insensitive.

Examples
JavaScript
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance
myApi.searchText("name", false); //this will search for the word "name" in the current document
See Also