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.9 - October 18, 2025
- **Improved:** Updated PDF.js library to 5.4.296 for stability and performance.
- **Added:** Ability to add, edit, view comments in the document.
New permission `options.permissions.editComments` with default value of `true`.
- **Improved:** Ensure toolbar menus are clamped to the viewer window
and repositioned when viewer window is scrolled, resized or menu is resized.
- **Improved:** Ensure top toolbar menus are always over vertical toolbar menus.
- **Fixed:** When creating multiple instances of viewer in the same page
`webviewerloaded` event was being registered multiple times thus causing errors.
The viewer id was being unnecessarily incremented even if it did not exist in the document.
Track viewer id internally as user may re-assign the window global variable.
Copy file name to clipboardExpand all lines: APIDocs.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -253,7 +253,7 @@ 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.permissions.editComments`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to edit comments of the document. This is disabled by default as it's not stable yet. (optional, default `false`)
256
+
*`options.permissions.editComments`**[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to edit comments of the document. (optional, default `true`)
257
257
*`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
258
i.e. the specified term will be searched and the term(s) will be highlighted in the pages.
259
259
For example, if you launch the viewer from a search results page, you can pass the same search term to the viewer.
@@ -432,7 +432,9 @@ Renders the component in the page.
432
432
#### Parameters
433
433
434
434
*`target`**[Element](https://developer.mozilla.org/docs/Web/API/Element)?** The target DOM element, e.g. the container or adjacent element.
435
-
If omitted HTML string will be returned.
435
+
If omitted, a HTML string will be returned.
436
+
Note that it's expected that user later adds this HTML string to the same window as the caller,
437
+
not to other frames, otherwise we cannot track iframe loading events, and component would not work.
436
438
*`position`**[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** A string representing the position relative to the targetElement* 'beforebegin': Before the targetElement itself.
437
439
* 'afterbegin': Just inside the targetElement, before its first child.
438
440
* 'beforeend': Just inside the targetElement, after its last child.
Copy file name to clipboardExpand all lines: dist/docs/index.html
+7-5Lines changed: 7 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.8 | Documentation</title>
5
+
<title>pdfjskit 2.4.9 | 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.'>
0 commit comments