UNPKG

@grapecity-software/gcdocs.pdfviewer

Version:
349 lines (331 loc) 69.2 kB
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IHighlightManager | Document Solutions PDF Viewer - v8.2.2</title><meta name="description" content="Documentation for Document Solutions PDF Viewer - v8.2.2"/><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 - v8.2.2</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 - v8.2.2</a></li> <li><a href="IHighlightManager.html">IHighlightManager</a></li></ul> <h1>Interface IHighlightManager</h1></div> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"><p>Interface for managing text highlights within a document. Provides methods to add, remove, retrieve, and clear highlights on specific pages.</p> </div></section> <section class="tsd-panel tsd-hierarchy"> <h4>Hierarchy</h4> <ul class="tsd-hierarchy"> <li><span class="target">IHighlightManager</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="IHighlightManager.html#addHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>add<wbr/>Highlight</span></a> <a href="IHighlightManager.html#addReplaceHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>add<wbr/>Replace<wbr/>Highlight</span></a> <a href="IHighlightManager.html#addReplaceHighlights" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>add<wbr/>Replace<wbr/>Highlights</span></a> <a href="IHighlightManager.html#cleanupDocument" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>cleanup<wbr/>Document</span></a> <a href="IHighlightManager.html#clearAllHighlights" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>clear<wbr/>All<wbr/>Highlights</span></a> <a href="IHighlightManager.html#clearAllReplaceHighlights" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>clear<wbr/>All<wbr/>Replace<wbr/>Highlights</span></a> <a href="IHighlightManager.html#clearHighlightedSegments" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>clear<wbr/>Highlighted<wbr/>Segments</span></a> <a href="IHighlightManager.html#getHighlightsForPage" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>get<wbr/>Highlights<wbr/>For<wbr/>Page</span></a> <a href="IHighlightManager.html#getReplaceTextData" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>get<wbr/>Replace<wbr/>Text<wbr/>Data</span></a> <a href="IHighlightManager.html#hasReplaceHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>has<wbr/>Replace<wbr/>Highlight</span></a> <a href="IHighlightManager.html#highlightTextSegment" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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<wbr/>Text<wbr/>Segment</span></a> <a href="IHighlightManager.html#removeHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>remove<wbr/>Highlight</span></a> <a href="IHighlightManager.html#removeReplaceHighlight" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>remove<wbr/>Replace<wbr/>Highlight</span></a> <a href="IHighlightManager.html#removeReplaceHighlights" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>remove<wbr/>Replace<wbr/>Highlights</span></a> <a href="IHighlightManager.html#repaintTextLayer" class="tsd-index-link tsd-kind-method tsd-parent-kind-interface"><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>repaint<wbr/>Text<wbr/>Layer</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-interface"><a id="addHighlight" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>add<wbr/>Highlight</span><a href="#addHighlight" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="addHighlight.addHighlight-1">add<wbr/>Highlight<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, highlight<span class="tsd-signature-symbol">: </span><a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a>, args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#addHighlight.addHighlight-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>Adds a custom highlight directly to a specified page.</p> <p>This method allows you to add a predefined highlight object to a specific page.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Add a custom highlight to page 1:</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-6">highlight</span><span class="hl-1"> = { </span><span class="hl-2">rects:</span><span class="hl-1"> [{ </span><span class="hl-2">x:</span><span class="hl-1"> </span><span class="hl-8">10</span><span class="hl-1">, </span><span class="hl-2">y:</span><span class="hl-1"> </span><span class="hl-8">20</span><span class="hl-1">, </span><span class="hl-2">w:</span><span class="hl-1"> </span><span class="hl-8">100</span><span class="hl-1">, </span><span class="hl-2">h:</span><span class="hl-1"> </span><span class="hl-8">15</span><span class="hl-1"> }], </span><span class="hl-2">color:</span><span class="hl-1"> </span><span class="hl-4">&#39;rgba(0, 255, 0, 0.3)&#39;</span><span class="hl-1"> };</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">addHighlight</span><span class="hl-1">(</span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-2">highlight</span><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 highlight should be added (0-based).</p> </div></li> <li> <h5>highlight: <a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a></h5> <div class="tsd-comment tsd-typography"><p>The highlight object to add.</p> </div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></h5> <div class="tsd-comment tsd-typography"><p>Optional behavior arguments, such as whether to skip repainting the text layer after adding the highlight.</p> </div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="addReplaceHighlight" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>add<wbr/>Replace<wbr/>Highlight</span><a href="#addReplaceHighlight" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="addReplaceHighlight.addReplaceHighlight-1">add<wbr/>Replace<wbr/>Highlight<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, highlight<span class="tsd-signature-symbol">: </span><a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a>, args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><a href="#addReplaceHighlight.addReplaceHighlight-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>Adds a replace text highlight to the specified page&#39;s replaced highlights map.</p> <a href="#note-for-users" id="note-for-users" style="color: inherit; text-decoration: none;"> <h2>Note for Users</h2> </a> <p>Replace highlights are used internally by the viewer to display replaced text segments (e.g., during text comparison or editing operations). For most use cases, regular highlights (<code>addHighlight</code>) or custom highlights are more appropriate.</p> <h3>Returns</h3><p>The start and end indices of the added replace highlight.</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 where the highlight should be added.</p> </div></li> <li> <h5>highlight: <a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a></h5> <div class="tsd-comment tsd-typography"><p>The highlight object to add.</p> </div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></h5> <div class="tsd-comment tsd-typography"><p>Optional behavior arguments, such as whether to skip repainting the text layer after adding the highlight.</p> </div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter"> <h5>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li> <li class="tsd-parameter"> <h5>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="addReplaceHighlights" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>add<wbr/>Replace<wbr/>Highlights</span><a href="#addReplaceHighlights" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="addReplaceHighlights.addReplaceHighlights-1">add<wbr/>Replace<wbr/>Highlights<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, highlights<span class="tsd-signature-symbol">: </span><a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a><span class="tsd-signature-symbol">[]</span>, args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{ </span>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><a href="#addReplaceHighlights.addReplaceHighlights-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>Adds multiple replace text highlights to the specified page&#39;s replaced highlights map.</p> <a href="#note-for-users" id="note-for-users" style="color: inherit; text-decoration: none;"> <h2>Note for Users</h2> </a> <p>Replace highlights are used internally by the viewer to display replaced text segments (e.g., during text comparison or editing operations). For most use cases, regular highlights (<code>addHighlight</code>) or custom highlights are more appropriate.</p> <h3>Returns</h3><p>The start and end indices range of the added replace highlights.</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 where the highlights should be added.</p> </div></li> <li> <h5>highlights: <a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a><span class="tsd-signature-symbol">[]</span></h5> <div class="tsd-comment tsd-typography"><p>An array of highlight objects to add.</p> </div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></h5> <div class="tsd-comment tsd-typography"><p>Optional behavior arguments, such as whether to skip repainting the text layer after adding the highlights.</p> </div></li></ul></div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{ </span>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h4> <ul class="tsd-parameters"> <li class="tsd-parameter"> <h5>end<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li> <li class="tsd-parameter"> <h5>start<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="cleanupDocument" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>cleanup<wbr/>Document</span><a href="#cleanupDocument" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="cleanupDocument.cleanupDocument-1">cleanup<wbr/>Document<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="#cleanupDocument.cleanupDocument-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>Cleans up the document by resetting the highlights and replaced highlights. This method clears all current highlights and replaced highlights, effectively preparing the document for a new state or fresh rendering.</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-interface"><a id="clearAllHighlights" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>clear<wbr/>All<wbr/>Highlights</span><a href="#clearAllHighlights" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="clearAllHighlights.clearAllHighlights-1">clear<wbr/>All<wbr/>Highlights<span class="tsd-signature-symbol">(</span>args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clearAllHighlights.clearAllHighlights-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>Clears all highlights from all pages in the document.</p> <p>This method removes all custom highlights from every page in the document. You can optionally control whether to skip repainting the text layer after clearing the highlights.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Clear all highlights from the entire document and repaint the text layer:</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">clearAllHighlights</span><span class="hl-1">();</span> </code></pre> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Clear all highlights from the entire document and skip repainting:</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">clearAllHighlights</span><span class="hl-1">({ </span><span class="hl-2">skipPaint:</span><span class="hl-1"> </span><span class="hl-0">true</span><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><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></h5> <div class="tsd-comment tsd-typography"><p>Optional behavior arguments. If <code>skipPaint</code> is <code>true</code>, the text layer will not be repainted immediately after clearing the highlights.</p> </div></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-interface"><a id="clearAllReplaceHighlights" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>clear<wbr/>All<wbr/>Replace<wbr/>Highlights</span><a href="#clearAllReplaceHighlights" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="clearAllReplaceHighlights.clearAllReplaceHighlights-1">clear<wbr/>All<wbr/>Replace<wbr/>Highlights<span class="tsd-signature-symbol">(</span>args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clearAllReplaceHighlights.clearAllReplaceHighlights-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>Clears all replaced highlights for a specified page.</p> <a href="#note-for-users" id="note-for-users" style="color: inherit; text-decoration: none;"> <h2>Note for Users</h2> </a> <p>Replace highlights are used internally by the viewer to display replaced text segments. For clearing regular highlights, use <code>clearHighlightedSegments</code> or <code>clearAllHighlights</code> instead.</p> </div> <div class="tsd-parameters"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameter-list"> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></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-interface"><a id="clearHighlightedSegments" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>clear<wbr/>Highlighted<wbr/>Segments</span><a href="#clearHighlightedSegments" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="clearHighlightedSegments.clearHighlightedSegments-1">clear<wbr/>Highlighted<wbr/>Segments<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-type">number</span><span class="tsd-signature-symbol">[]</span>, args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clearHighlightedSegments.clearHighlightedSegments-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>Clears all highlights from one or more specific pages.</p> <p>Removes all custom highlights from the specified pages. You can pass either a single page index or an array of page indices.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Clear highlights from page 3:</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">clearHighlightedSegments</span><span class="hl-1">(</span><span class="hl-8">3</span><span class="hl-1">);</span> </code></pre> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Clear highlights from pages 1, 4, and 5:</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">clearHighlightedSegments</span><span class="hl-1">([</span><span class="hl-8">1</span><span class="hl-1">, </span><span class="hl-8">4</span><span class="hl-1">, </span><span class="hl-8">5</span><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><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5> <div class="tsd-comment tsd-typography"><p>The index of the page or an array of page indices to clear highlights from.</p> </div></li> <li> <h5><code class="tsd-tag ts-flagOptional">Optional</code> args: <a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a></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-interface"><a id="getHighlightsForPage" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>get<wbr/>Highlights<wbr/>For<wbr/>Page</span><a href="#getHighlightsForPage" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="getHighlightsForPage.getHighlightsForPage-1">get<wbr/>Highlights<wbr/>For<wbr/>Page<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><a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a><span class="tsd-signature-symbol">[]</span><a href="#getHighlightsForPage.getHighlightsForPage-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 all highlights for a specified page.</p> <p>Returns an array of highlight objects present on the given page.</p> <h3>Returns</h3><p>An array of highlights on the specified page.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Get all highlights from page 2:</span><br/><span class="hl-0">const</span><span class="hl-1"> </span><span class="hl-6">highlights</span><span class="hl-1"> = </span><span class="hl-2">viewer</span><span class="hl-1">.</span><span class="hl-3">getHighlights</span><span class="hl-1">(</span><span class="hl-8">2</span><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 to retrieve highlights from (0-based).</p> </div></li></ul></div> <h4 class="tsd-returns-title">Returns <a href="ICustomHighlight.html" class="tsd-signature-type" data-tsd-kind="Interface">ICustomHighlight</a><span class="tsd-signature-symbol">[]</span></h4></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="getReplaceTextData" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>get<wbr/>Replace<wbr/>Text<wbr/>Data</span><a href="#getReplaceTextData" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="getReplaceTextData.getReplaceTextData-1">get<wbr/>Replace<wbr/>Text<wbr/>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../types/ReplaceTextModel.html" class="tsd-signature-type" data-tsd-kind="Type alias">ReplaceTextModel</a><span class="tsd-signature-symbol">[]</span><a href="#getReplaceTextData.getReplaceTextData-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 an array of <code>ReplaceTextModel</code> data from the replaced highlights. This method iterates over the <code>replaceHighlights</code> map, collects the <code>replaceData</code> from each highlight, and returns it in an array.</p> <h3>Returns</h3><p>An array of <code>ReplaceTextModel</code> objects, or <code>undefined</code> if no replace highlights are found.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../types/ReplaceTextModel.html" class="tsd-signature-type" data-tsd-kind="Type alias">ReplaceTextModel</a><span class="tsd-signature-symbol">[]</span></h4></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="hasReplaceHighlight" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>has<wbr/>Replace<wbr/>Highlight</span><a href="#hasReplaceHighlight" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="hasReplaceHighlight.hasReplaceHighlight-1">has<wbr/>Replace<wbr/>Highlight<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, hashId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#hasReplaceHighlight.hasReplaceHighlight-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>Checks if a replace highlight exists for the given page and hash ID.</p> <a href="#note-for-users" id="note-for-users" style="color: inherit; text-decoration: none;"> <h2>Note for Users</h2> </a> <p>Replace highlights are used internally by the viewer to display replaced text segments. For checking regular highlights, use <code>getHighlightsForPage</code> instead.</p> <h3>Returns</h3><p><code>true</code> if the replace highlight exists, otherwise <code>false</code>.</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 to check.</p> </div></li> <li> <h5>hashId: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"><p>The unique hash ID of the replace highlight to check.</p> </div></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-interface"><a id="highlightTextSegment" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>highlight<wbr/>Text<wbr/>Segment</span><a href="#highlightTextSegment" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="highlightTextSegment.highlightTextSegment-1">highlight<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>clearPrevious<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</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>skipPaint<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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#highlightTextSegment.highlightTextSegment-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 segment of text on a given page.</p> <p>This method allows you to highlight a portion of text by specifying the start and end character indices. The appearance of the highlight can be customized using the optional parameters.</p> <h3>Returns</h3><p>A promise that resolves once the highlight has been added.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Highlight text on page 2 from character index 10 to 20 with a yellow background:</span><br/><span class="hl-2">highlightManager</span><span class="hl-1">.</span><span class="hl-3">highlightTextSegment</span><span class="hl-1">(</span><span class="hl-8">2</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><span class="hl-2">color:</span><span class="hl-1"> </span><span class="hl-4">&#39;rgba(255, 255, 0, 0.5)&#39;</span><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 segment 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.</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>clearPrevious<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</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>skipPaint<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>Optional parameters to customize the appearance and behavior of the highlight.</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> <div class="tsd-comment tsd-typography"><p>The border color for the highlight in <code>rgba</code>, <code>hex</code>, or named color format.</p> </div></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.</p> </div></li> <li class="tsd-parameter"> <h5><code class="tsd-tag ts-flagOptional">Optional</code> clear<wbr/>Previous<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"><p>If <code>true</code>, clears existing highlights before adding the new one.</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> <div class="tsd-comment tsd-typography"><p>The fill color for the highlight in <code>rgba</code>, <code>hex</code>, or named color format.</p> </div></li> <li class="tsd-parameter"> <h5><code class="tsd-tag ts-flagOptional">Optional</code> skip<wbr/>Paint<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"><p>If <code>true</code>, skips the immediate repaint of the text layer after adding the highlight.</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">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="removeHighlight" class="tsd-anchor"></a> <h3 class="tsd-anchor-link"><span>remove<wbr/>Highlight</span><a href="#removeHighlight" 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-interface"> <li class="tsd-signature tsd-anchor-link" id="removeHighlight.removeHighlight-1">remove<wbr/>Highlight<span class="tsd-signature-symbol">(</span>pageIndex<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, index<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, args<span class="tsd-signature-symbol">?: </span><a href="../types/HighlightBehaviorArgs.html" class="tsd-signature-type" data-tsd-kind="Type alias">HighlightBehaviorArgs</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#removeHighlight.removeHighlight-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>Removes a specific highlight from a page.</p> <p>This method removes a highlight at a specified index from the highlights on a given page.</p> <h3>Example</h3><pre><code class="language-ts"><span class="hl-5">// Remo