@grapecity/gcpdfviewer
Version:
GcDocs PDF Viewer
293 lines (283 loc) • 105 kB
HTML
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>GcPdfSearcher | Document Solutions PDF Viewer - v7.2.3</title><meta name="description" content="Documentation for Document Solutions PDF Viewer - v7.2.3"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><link rel="stylesheet" href="../assets/custom.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">Document Solutions PDF Viewer - v7.2.3</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
<ul class="tsd-breadcrumb">
<li><a href="../index.html">Document Solutions PDF Viewer - v7.2.3</a></li>
<li><a href="GcPdfSearcher.html">GcPdfSearcher</a></li></ul>
<h1>Class GcPdfSearcher</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>PDF document searcher.
Generates asynchronous search results (see search method).
The GcPdfSearcher API was designed to be used internally with Search Panel UI.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">GcPdfSearcher</span></li></ul></section>
<section class="tsd-panel">
<h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><span class="tsd-signature-type">IPdfSearcher</span></li></ul></section>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
<div class="tsd-accordion-details">
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Methods</h3>
<div class="tsd-index-list"><a href="GcPdfSearcher.html#_calculatePhraseMatch" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-2048-path"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)" id="icon-2048-text"></path></svg><span>_calculate<wbr/>Phrase<wbr/>Match</span></a>
<a href="GcPdfSearcher.html#_extractText" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>_extract<wbr/>Text</span></a>
<a href="GcPdfSearcher.html#_isEntireWord" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>_is<wbr/>Entire<wbr/>Word</span></a>
<a href="GcPdfSearcher.html#_prepareMatches" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>_prepare<wbr/>Matches</span></a>
<a href="GcPdfSearcher.html#applyHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>apply<wbr/>Highlight</span></a>
<a href="GcPdfSearcher.html#cancel" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>cancel</span></a>
<a href="GcPdfSearcher.html#createHighlightFromTextSegment" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>create<wbr/>Highlight<wbr/>From<wbr/>Text<wbr/>Segment</span></a>
<a href="GcPdfSearcher.html#fetchPageContent" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>fetch<wbr/>Page<wbr/>Content</span></a>
<a href="GcPdfSearcher.html#fetchPageContentLineEndings" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>fetch<wbr/>Page<wbr/>Content<wbr/>Line<wbr/>Endings</span></a>
<a href="GcPdfSearcher.html#fetchPageTextRects" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>fetch<wbr/>Page<wbr/>Text<wbr/>Rects</span></a>
<a href="GcPdfSearcher.html#highlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>highlight</span></a>
<a href="GcPdfSearcher.html#isResultSelected" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>is<wbr/>Result<wbr/>Selected</span></a>
<a href="GcPdfSearcher.html#nextSearchResult" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>next<wbr/>Search<wbr/>Result</span></a>
<a href="GcPdfSearcher.html#resetResults" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>reset<wbr/>Results</span></a>
<a href="GcPdfSearcher.html#search" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>search</span></a>
<a href="GcPdfSearcher.html#toggle" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>toggle</span></a>
<a href="GcPdfSearcher.html#updateAllPages" class="tsd-index-link tsd-kind-method tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>update<wbr/>All<wbr/>Pages</span></a>
</div></section>
<section class="tsd-index-section">
<h3 class="tsd-index-heading">Accessors</h3>
<div class="tsd-index-list"><a href="GcPdfSearcher.html#_query" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-262144-path"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)" id="icon-262144-text"></path></svg><span>_query</span></a>
<a href="GcPdfSearcher.html#highlightAll" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>highlight<wbr/>All</span></a>
<a href="GcPdfSearcher.html#selectedSearchResult" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>selected<wbr/>Search<wbr/>Result</span></a>
<a href="GcPdfSearcher.html#selectedSearchResultIndex" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>selected<wbr/>Search<wbr/>Result<wbr/>Index</span></a>
<a href="GcPdfSearcher.html#state" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>state</span></a>
<a href="GcPdfSearcher.html#totalResultsCount" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>total<wbr/>Results<wbr/>Count</span></a>
<a href="GcPdfSearcher.html#totalResultsCountPromise" class="tsd-index-link tsd-kind-accessor tsd-parent-kind-class"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-262144-path"></use><use href="#icon-262144-text"></use></svg><span>total<wbr/>Results<wbr/>Count<wbr/>Promise</span></a>
</div></section></div></details></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_calculatePhraseMatch" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>_calculate<wbr/>Phrase<wbr/>Match</span><a href="#_calculatePhraseMatch" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="_calculatePhraseMatch._calculatePhraseMatch-1">_calculate<wbr/>Phrase<wbr/>Match<span class="tsd-signature-symbol">(</span>query<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, pageContentsEndings<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span>, pageContent<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, entireWord<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, startsWith<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, endsWith<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, wildcards<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>matches<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>matchesLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><a href="#_calculatePhraseMatch._calculatePhraseMatch-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Calculates the phrase matches in the given page content based on the specified query and matching options.</p>
<h3>Returns</h3><p>An object containing the matches and their lengths.</p>
<h3>Returns</h3><p>matches - An array of character indices (character indices) on the page where matches were found.</p>
<h3>Returns</h3><p>matchesLength - An array of lengths for each matched text.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>query: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>The query string to search for.</p>
</div></li>
<li>
<h5>pageContentsEndings: <span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span></h5>
<div class="tsd-comment tsd-typography"><p>An object representing the line endings on the page, where keys are character indices and values indicate line endings.</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter-index-signature">
<h5><span class="tsd-signature-symbol">[</span>x: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">boolean</span></h5></li></ul></li>
<li>
<h5>pageContent: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography"><p>The content of the page.</p>
</div></li>
<li>
<h5>entireWord: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography"><p>Whether to match the entire word only.</p>
</div></li>
<li>
<h5>startsWith: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography"><p>Whether the query should match phrases that start with the query string.</p>
</div></li>
<li>
<h5>endsWith: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography"><p>Whether the query should match phrases that end with the query string.</p>
</div></li>
<li>
<h5>wildcards: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography"><p>Whether the query allows wildcards for matching.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>matches<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>matchesLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span></h4>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5>matches<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li>
<li class="tsd-parameter">
<h5>matches<wbr/>Length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_extractText" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>_extract<wbr/>Text</span><a href="#_extractText" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="_extractText._extractText-1">_extract<wbr/>Text<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_extractText._extractText-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Extract all text from pdf document once.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_isEntireWord" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>_is<wbr/>Entire<wbr/>Word</span><a href="#_isEntireWord" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="_isEntireWord._isEntireWord-1">_is<wbr/>Entire<wbr/>Word<span class="tsd-signature-symbol">(</span>content<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, lineEndings<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span>, startIdx<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#_isEntireWord._isEntireWord-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Determine if the search query constitutes a "whole word", by comparing the
first/last character type with the preceding/following character type.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>content: <span class="tsd-signature-type">any</span></h5></li>
<li>
<h5>lineEndings: <span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span></h5>
<ul class="tsd-parameters">
<li class="tsd-parameter-index-signature">
<h5><span class="tsd-signature-symbol">[</span>x: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">boolean</span></h5></li></ul></li>
<li>
<h5>startIdx: <span class="tsd-signature-type">any</span></h5></li>
<li>
<h5>length: <span class="tsd-signature-type">any</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_prepareMatches" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>_prepare<wbr/>Matches</span><a href="#_prepareMatches" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="_prepareMatches._prepareMatches-1">_prepare<wbr/>Matches<span class="tsd-signature-symbol">(</span>matchesWithLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, matches<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, matchesLength<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_prepareMatches._prepareMatches-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Helper for multi-term search that fills the <code>matchesWithLength</code> array
and handles cases where one search term includes another search term (for
example, "tamed tame" or "this is"). It looks for intersecting terms in
the <code>matches</code> and keeps elements with a longer match length.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>matchesWithLength: <span class="tsd-signature-type">any</span></h5></li>
<li>
<h5>matches: <span class="tsd-signature-type">any</span></h5></li>
<li>
<h5>matchesLength: <span class="tsd-signature-type">any</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="applyHighlight" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>apply<wbr/>Highlight</span><a href="#applyHighlight" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="applyHighlight.applyHighlight-1">apply<wbr/>Highlight<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#applyHighlight.applyHighlight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Render highlight for the current search result.</p>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="cancel" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>cancel</span><a href="#cancel" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="cancel.cancel-1">cancel<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#cancel.cancel-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Cancel search task.</p>
<h3>Example</h3><pre><code class="language-javascript"><span class="hl-5">// Open the document, find the text 'wildlife' and highlight the first result:</span><br/><span class="hl-0">async</span><span class="hl-1"> </span><span class="hl-0">function</span><span class="hl-1"> </span><span class="hl-3">loadPdfViewer</span><span class="hl-1">(</span><span class="hl-2">selector</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1"> = </span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-3">GcPdfViewer</span><span class="hl-1">(</span><span class="hl-2">selector</span><span class="hl-1">, { </span><span class="hl-2">restoreViewStateOnLoad:</span><span class="hl-1"> </span><span class="hl-0">false</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-3">addDefaultPanels</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">afterOpenPromise</span><span class="hl-1"> = </span><span class="hl-0">new</span><span class="hl-1"> </span><span class="hl-9">Promise</span><span class="hl-1">((</span><span class="hl-2">resolve</span><span class="hl-1">)</span><span class="hl-0">=></span><span class="hl-1">{ </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-2">onAfterOpen</span><span class="hl-1">.</span><span class="hl-3">register</span><span class="hl-1">(()</span><span class="hl-0">=></span><span class="hl-1">{ </span><span class="hl-3">resolve</span><span class="hl-1">(); }); });</span><br/><span class="hl-1"> </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-3">open</span><span class="hl-1">(</span><span class="hl-4">'wetlands.pdf'</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-2">afterOpenPromise</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">findOptions</span><span class="hl-1"> = { </span><span class="hl-2">Text:</span><span class="hl-1"> </span><span class="hl-4">'wildlife'</span><span class="hl-1"> };</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">searchIterator</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-2">searcher</span><span class="hl-1">.</span><span class="hl-3">search</span><span class="hl-1">(</span><span class="hl-2">findOptions</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">searchResult</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-2">searchIterator</span><span class="hl-1">.</span><span class="hl-3">next</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-2">searcher</span><span class="hl-1">.</span><span class="hl-3">cancel</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-2">searcher</span><span class="hl-1">.</span><span class="hl-3">highlight</span><span class="hl-1">(</span><span class="hl-2">searchResult</span><span class="hl-1">.</span><span class="hl-2">value</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><span class="hl-3">loadPdfViewer</span><span class="hl-1">(</span><span class="hl-4">'#root'</span><span class="hl-1">);</span>
</code></pre>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="createHighlightFromTextSegment" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>create<wbr/>Highlight<wbr/>From<wbr/>Text<wbr/>Segment</span><a href="#createHighlightFromTextSegment" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="createHighlightFromTextSegment.createHighlightFromTextSegment-1">create<wbr/>Highlight<wbr/>From<wbr/>Text<wbr/>Segment<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, startCharIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, endCharIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, args<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>borderColor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>borderWidth<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>color<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>paintHandler<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ICustomHighlight</span><span class="tsd-signature-symbol">></span><a href="#createHighlightFromTextSegment.createHighlightFromTextSegment-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Highlights a specified portion of text on a given page.</p>
<h3>Returns</h3><p>A promise that resolves to <code>true</code> if the text was successfully highlighted, otherwise <code>false</code>.</p>
<h3>Example</h3><pre><code class="language-javascript"><span class="hl-5">// Highlight the text from character 10 to character 20 on the first page with custom highlight colors.</span><br/><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-3">highlightTextSegment</span><span class="hl-1">(</span><span class="hl-8">0</span><span class="hl-1">, </span><span class="hl-8">10</span><span class="hl-1">, </span><span class="hl-8">20</span><span class="hl-1">, {</span><br/><span class="hl-1"> </span><span class="hl-2">color:</span><span class="hl-1"> </span><span class="hl-4">'rgba(173, 216, 230, 0.5)'</span><span class="hl-1">, </span><span class="hl-5">// semi-transparent light blue</span><br/><span class="hl-1"> </span><span class="hl-2">borderColor:</span><span class="hl-1"> </span><span class="hl-4">'blue'</span><span class="hl-1">, </span><span class="hl-5">// named color for the border</span><br/><span class="hl-1"> </span><span class="hl-2">borderWidth:</span><span class="hl-1"> </span><span class="hl-8">4</span><span class="hl-1">, </span><span class="hl-5">// custom border width</span><br/><span class="hl-1"> </span><span class="hl-2">clearPrevious:</span><span class="hl-1"> </span><span class="hl-0">true</span><br/><span class="hl-1">});</span>
</code></pre>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>pageIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The index of the page where the text is located (0-based).</p>
</div></li>
<li>
<h5>startCharIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The starting character index (0-based) of the text segment to highlight.</p>
</div></li>
<li>
<h5>endCharIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The ending character index (0-based) of the text segment to highlight.
The character at this index will be excluded from the highlight.</p>
</div></li>
<li>
<h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <span class="tsd-signature-symbol">{ </span>borderColor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>borderWidth<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>color<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>paintHandler<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span></h5>
<div class="tsd-comment tsd-typography"><p>Optional parameters to customize the highlight, such as color, border color, and width.</p>
</div>
<ul class="tsd-parameters">
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> border<wbr/>Color<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> border<wbr/>Width<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The width of the highlight border in pixels (default is 2 pixels).</p>
</div></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> color<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span></h5></li>
<li class="tsd-parameter">
<h5><code class="tsd-tag ts-flagOptional">Optional</code> paint<wbr/>Handler<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography"><p>A custom function for handling the painting of the highlight (optional).</p>
</div></li></ul></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ICustomHighlight</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="fetchPageContent" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>fetch<wbr/>Page<wbr/>Content</span><a href="#fetchPageContent" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="fetchPageContent.fetchPageContent-1">fetch<wbr/>Page<wbr/>Content<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span><a href="#fetchPageContent.fetchPageContent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Retrieves the content of a specific page.</p>
<h3>Returns</h3><p>The content of the specified page.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>pageIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The index of the page.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="fetchPageContentLineEndings" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>fetch<wbr/>Page<wbr/>Content<wbr/>Line<wbr/>Endings</span><a href="#fetchPageContentLineEndings" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="fetchPageContentLineEndings.fetchPageContentLineEndings-1">fetch<wbr/>Page<wbr/>Content<wbr/>Line<wbr/>Endings<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span><a href="#fetchPageContentLineEndings.fetchPageContentLineEndings-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Retrieves the line endings of the content of a specific page.</p>
<h3>Returns</h3><p>The line endings of the content of the specified page.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>pageIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The index of the page.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>[x: <span class="tsd-signature-type">number</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="fetchPageTextRects" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>fetch<wbr/>Page<wbr/>Text<wbr/>Rects</span><a href="#fetchPageTextRects" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="fetchPageTextRects.fetchPageTextRects-1">fetch<wbr/>Page<wbr/>Text<wbr/>Rects<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>items<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IGcTextRect</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>styles<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span><a href="#fetchPageTextRects.fetchPageTextRects-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Retrieves the text rectangles and styles of a specific page.</p>
<h3>Returns</h3><p>The text rectangles and styles of the specified page.</p>
</div>
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>pageIndex: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography"><p>The index of the page.</p>
</div></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>items<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IGcTextRect</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>styles<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></h4></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="highlight" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>highlight</span><a href="#highlight" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-anchor-link" id="highlight.highlight-1">highlight<span class="tsd-signature-symbol">(</span>searchResult<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">SearchResult</span>, pageIndex<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><a href="#highlight.highlight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
<li class="tsd-description">
<div class="tsd-comment tsd-typography"><p>Navigates to a page containing the result and highlights found text.</p>
<h3>Example</h3><pre><code class="language-javascript"><span class="hl-5">// Open the document, find the text 'wildlife' and highlight the first result:</span><br/><span class="hl-0">async</span><span class="hl-1"> </span><span class="hl-0">function</span><span class="hl-1"> </span><span class="hl-3">loadPdfViewer</span><span class="hl-1">(</span><span class="hl-2">selector</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-0">var</span><span class="hl-1"> </span><span class="hl-2">viewer</span><span class="hl-1"> = </span><span class="hl-0">n