PDFViewer.search()
Open the search panel and run a query across all pages. Results are shown in the panel, not returned: it is a UI action. For matches as data, use doc.text.search(). Needs the
extract feature: its highlights and count say where the words are (the search panel the user types in needs no feature).methodSearchsince 1.0.0
Signature
search(query: string): Promise<void>
Parameters
| Parameter | Type | Description |
|---|---|---|
| query | string | The words to look for. |
Returns
Promise<void> Resolves once the search has run.
Throws
FEATURE_NOT_LICENSEDwithoutextract.INVALID_STATEafterdestroy().
Example
TypeScript
await viewer.search('refund');