Reference Guide
Reference Guides / JavaScript API / Actions / Document / Search
In This Topic
    Search
    In This Topic
     Search

    This function allows you to search text in the currently loaded document.

    Search: function (docuViewareID, textToSearch, wholeWord, caseSensitive, pageSelection, anyWord)

    Parameters

    docuViewareID
    The identifier for the DocuVieware™ instance you want to search the text in.
    textToSearch
    A string containing the text you want to search.
    wholeWord
    A boolean to set if only whole words should be considered.
    caseSensitive
    A boolean to set if the search should be case sensitive or not.
    pageSelection
    A numeric value to set if the search is done inside the current page or the whole document. Possible values are:
    • 0 = Current page only
    • 1 = Whole document
    anyWord
    A boolean that allows to search several words at once.

    Return Value

    1 if error, 0 if success.