Skip to content

Commit be00864

Browse files
committed
Version 2.2.3
## Version 2.2.3 - May 6, 2025 - **Added:** `editAnnotations` permission for ability to edit annotations of the document. So now, viewing and editing annotation permissions are separated, this is mainly done because `viewAnnotations` permission can also effect displaying of the signatures in the document so most of the time you will want to keep it enabled. However now you can disable `editAnnotations` without effecting display of the signatures and existing annotations. `editAnnotations` will enable/disable tools like Add Signature, Highlight, Draw, Add Image (buttons on the vertical toolbar). If no `viewAnnotations` permission but `editAnnotations` permission, then you can add new annotations but not view and edit existing ones. `editAnnotations` default value is `true`.
1 parent ce6aff0 commit be00864

9 files changed

Lines changed: 24 additions & 10 deletions

File tree

APIDocs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ Renders PDF.js viewer in an iframe but updates UI theme and structure for a neat
248248
* `options.permissions.rotate` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to rotate the page or document, e.g. rotate clockwise and rotate counterclockwise. (optional, default `true`)
249249
* `options.permissions.changeScrollMode` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to change scroll mode of the document, e.g. vertical, horizontal etc. (optional, default `true`)
250250
* `options.permissions.changeSpreadMode` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to change spread mode of the document, e.g. odd, even etc. (optional, default `true`)
251-
* `options.permissions.viewAnnotations` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Ability to view and edit annotations of the document. (optional, default `true`)
251+
* `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`)
252+
* `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`)
252253
* `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`)
253254
* `options.searchOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** The text search options of the viewer.
254255
If you specify a search term, an automatic search will be done when the document is displayed,

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Here is a list of all the options with the default values, that can be passed to
125125
changeSpreadMode: true,
126126

127127
viewAnnotations: true,
128+
editAnnotations: true,
128129
fillForms: true
129130
},
130131

dist/docs/index.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset='utf-8'>
5-
<title>pdfjskit 2.2.2 | Documentation</title>
5+
<title>pdfjskit 2.2.3 | Documentation</title>
66
<meta name='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.'>
77
<meta name='viewport' content='width=device-width,initial-scale=1'>
88
<link href='assets/bass.css' rel='stylesheet'>
@@ -16,7 +16,7 @@
1616
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
1717
<div class='py1 px2'>
1818
<h3 class='mb0 no-anchor'>pdfjskit</h3>
19-
<div class='mb1'><code>2.2.2</code></div>
19+
<div class='mb1'><code>2.2.3</code></div>
2020
<input
2121
placeholder='Filter'
2222
id='filter-input'
@@ -1262,7 +1262,18 @@ <h3 class='fl m0' id='pdfviewer'>
12621262

12631263
(default <code>true</code>)
12641264
</td>
1265-
<td class='break-word'><span>Ability to view and edit annotations of the document.
1265+
<td class='break-word'><span>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.
1266+
</span></td>
1267+
</tr>
1268+
1269+
1270+
1271+
<tr>
1272+
<td class='break-word'><span class='code bold'>options.permissions.editAnnotations</span> <code class='quiet'><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></code>
1273+
1274+
(default <code>true</code>)
1275+
</td>
1276+
<td class='break-word'><span>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.
12661277
</span></td>
12671278
</tr>
12681279

dist/pdfjskit/pdfjskit.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pdfjskit/pdfjskit.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

examples/pdfjskit-vite-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"vite": "^5.4.8"
1313
},
1414
"dependencies": {
15-
"pdfjskit": "^2.2.2"
15+
"pdfjskit": "^2.2.3"
1616
}
1717
}

package/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ Here is a list of all the options with the default values, that can be passed to
125125
changeSpreadMode: true,
126126

127127
viewAnnotations: true,
128+
editAnnotations: true,
128129
fillForms: true
129130
},
130131

package/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pdfjskit",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "PdfJsKit is a PDF Viewer built on top of PDF.js, with modern UI and new features which supports integration for all JS frameworks.",
55
"keywords": [
66
"pdf-viewer",

0 commit comments

Comments
 (0)