You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Version 2.4.3 - August 27, 2025
- **Improved:** When using `searchOptions.matchAnyWord`, now the quotation marks can be used to specify phrases
inside a query that is set via `searchOptions.term`.
For example;
- `red "four wheels" petrol` will match `red` or `four wheels` or `petrol` or `red four wheels petrol`
- `red ""four wheels"" petrol` will match `red` or `"four wheels"` or `petrol` or `red "four wheels" petrol`
Note that two consecutive quotation marks `""` can be used to escape, i.e. to search for a quotation mark literally as `"`.
The same feature can also be used in the Viewer's Find dialog.
Copy file name to clipboardExpand all lines: APIDocs.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,18 +253,20 @@ Renders PDF.js viewer in an iframe but updates UI theme and structure for a neat
253
253
*`options.permissions.viewAnnotations`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to view annotations of the document. Note that this can also effect displaying of the signatures in the document so be aware when you disable it. (optional, default `true`)
254
254
*`options.permissions.editAnnotations`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to edit annotations of the document. Tools like Add Signature, Highlight, Draw, Add Image will be available. If no ViewAnnotations permission, then you can add new annotations but not view and edit existing ones. (optional, default `true`)
255
255
*`options.permissions.fillForms`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to fill values into form fields of the document. Requires also ViewAnnotations permission. (optional, default `true`)
256
-
*`options.searchOptions`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The text search options of the viewer.
257
-
If you specify a search term, an automatic search will be done when the document is displayed,
256
+
*`options.searchOptions`**[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The text search options of the viewer.If you specify a search term, an automatic search will be done when the document is displayed,
258
257
i.e. the specified term will be searched and the term(s) will be highlighted in the pages.
259
258
For example, if you launch the viewer from a search results page, you can pass the same search term to the viewer.
260
259
261
-
*`options.searchOptions.term`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** A value that specifies the search term used. (optional, default `""`)
260
+
*`options.searchOptions.term`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** A value that specifies the search term used.Refer to `options.searchOptions.matchAnyWord` to see how to specify multiple phrases inside a query. (optional, default `""`)
262
261
*`options.searchOptions.matchCase`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** The search should be case-sensitive, i.e. the found text must match the case of the search term. (optional, default `false`)
263
262
*`options.searchOptions.matchDiacritics`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** The search should match the letters with diacritics (accents), e.g `u` matches also `ü`.
264
263
Diacritics, often loosely called `accents`, are the various little dots and squiggles which, in many languages,
265
264
are written above, below or on top of certain letters of the alphabet to indicate something about their pronunciation. (optional, default `false`)
266
265
*`options.searchOptions.matchWholeWord`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** The search should match the whole word only, i.e the found text must be a whole word (surrounded by a non-word character). (e.g. "doc" matches " doc " or ".doc" but not "document"). (optional, default `false`)
267
-
*`options.searchOptions.matchAnyWord`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** The search should match the term as a whole or match any word in the term separately (e.g. "bicycle bells" or "bicycle" or "bells"). (optional, default `false`)
266
+
*`options.searchOptions.matchAnyWord`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** The search should match the term as a whole or match any word in the term separately.For example;*`bicycle bells` will match `bicycle` or `bells` or `bicycle bells`
267
+
*`red "four wheels" petrol` will match `red` or `four wheels` or `petrol` or `red four wheels petrol`
268
+
*`red ""four wheels"" petrol` will match `red` or `"four wheels"` or `petrol` or `red "four wheels" petrol`The quotation marks can be used to specify phrases inside a query.
269
+
Note that two consecutive quotation marks `""` can be used to escape, i.e. to search for a quotation mark literally as `"`. (optional, default `false`)
268
270
*`options.searchOptions.highlightColor`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The color to use for highlighting search results. Default is yellow. (optional, default `"#FFFF00"`)
269
271
*`options.searchOptions.activeHighlightColor`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The color to use for highlighting active (current) search result. Default is orange. (optional, default `"#FFA500"`)
270
272
*`options.searchOptions.highlightAll`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** A value that specifies whether to highlight all search results, i.e. not only active (current) search result. (optional, default `true`)
Copy file name to clipboardExpand all lines: dist/docs/index.html
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
<htmllang="en">
3
3
<head>
4
4
<metacharset='utf-8'>
5
-
<title>pdfjskit 2.4.2 | Documentation</title>
5
+
<title>pdfjskit 2.4.3 | Documentation</title>
6
6
<metaname='description' content='PdfJsKit is a PDF Viewer built on top of PDF.js, with modern UI and new features which supports integration for all JS frameworks.'>
<tdclass='break-word'><span>The search should match the term as a whole or match any word in the term separately (e.g. "bicycle bells" or "bicycle" or "bells").
1371
+
<tdclass='break-word'><span>The search should match the term as a whole or match any word in the term separately.
1372
+
<p>For example;</p>
1373
+
<ul>
1374
+
<li><code>bicycle bells</code> will match <code>bicycle</code> or <code>bells</code> or <code>bicycle bells</code></li>
1375
+
<li><code>red "four wheels" petrol</code> will match <code>red</code> or <code>four wheels</code> or <code>petrol</code> or <code>red four wheels petrol</code></li>
1376
+
<li><code>red ""four wheels"" petrol</code> will match <code>red</code> or <code>"four wheels"</code> or <code>petrol</code> or <code>red "four wheels" petrol</code></li>
1377
+
</ul>
1378
+
<p>The quotation marks can be used to specify phrases inside a query.
1379
+
Note that two consecutive quotation marks <code>""</code> can be used to escape, i.e. to search for a quotation mark literally as <code>"</code>.</p>
0 commit comments