Skip to content

Commit

Permalink
#639 now unverified digital signatures can be displayed without havin…
Browse files Browse the repository at this point in the history
…g to deactivate form support. Use the feature at your own risk - currently there's no way to detect forget signatures! #632 allow for multi-line custom toolbars
  • Loading branch information
stephanrauh committed Feb 6, 2021
1 parent 5c849d1 commit a7d3787
Show file tree
Hide file tree
Showing 55 changed files with 1,391 additions and 1,728 deletions.
2,748 changes: 1,182 additions & 1,566 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@angular/platform-browser-dynamic": "^7.2.16",
"@angular/router": "^7.2.16",
"core-js": "^2.6.12",
"fsevents": "^2.3.1",
"ngx-extended-pdf-viewer": "file:./dist/ngx-extended-pdf-viewer",
"rxjs": "^6.6.3",
"zone.js": "^0.11.3"
Expand Down
4 changes: 4 additions & 0 deletions projects/ngx-extended-pdf-viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Version 8.0 also supports server-side rendering. The current approach probably i
Starting with version 8.0.0-beta.4, ngx-extended-pdf-viewer uses version 2.7 of pdf.js for the default branch and pdf.js 2.8 for the bleeding-edge branch. Among other things, this means improved highlighting. When using the find function, the highlighting was often a bit off if the text used not just letters and digits. It's still not perfect, but in many cases it's better than it used to be. If you're interested in the gory details, here's the link to the pull request: https://github.com/mozilla/pdf.js/pull/12855

As of version 8.0.0-beta.4, the improved highlighting hasn't been added to fuzzy search yet. Fuzzy search still works, but chances are it's going to improve soon.

Signatures can now be shown without having to deactivate AcroForm support. Note that the libraries still doesn't verify the signatures, so use the feature at your own risk. You don't want to display forged signatures.

Custom toolbars can now have multiple lines.
## Other potentially breaking changes
Version 7.1. is a pure bug-fix release. It's extremely unlikely, but it might cause difficulties if the PDF viewer is destroyed and immediately re-created. Should you run into this, adding a delay of a single millisecond fixes this (or even a `setTimeout()` without the delay parameter).

Expand Down
1 change: 1 addition & 0 deletions projects/ngx-extended-pdf-viewer/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,4 @@
- 8.0.0-beta.4 updated to the newest version of pdf.js (default branch now is pdf.js 2.7, bleeding-edge now is pdf.js 2.8)
- 8.0.0-beta.5 #623 don't show the "unverified signature" warning if the signature is not displayed
- 8.0.0-beta.6 #633 hide the loading bar not only for the first instance of ngx-extended-pdf-viewer, but also for every instance shown later (version 2.7 only)
- 8.0.0-beta.7 #639 now unverified digital signatures can be displayed without having to deactivate form support. Use the feature at your own risk - currently there's no way to detect forget signatures! #632 allow for multi-line custom toolbars
2 changes: 1 addition & 1 deletion projects/ngx-extended-pdf-viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ngx-extended-pdf-viewer",
"description": "Embedding PDF files in your Angular application. Highly configurable viewer including the toolbar, sidebar, and all the features you're used to.",
"version": "8.0.0-beta.6",
"version": "8.0.0-beta.7",
"license": "Apache-2.0",
"repository": {
"url": "https://github.com/stephanrauh/ngx-extended-pdf-viewer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ var _text_layer = __w_pdfjs_require__(151);

var _svg = __w_pdfjs_require__(152);

var pdfjsVersion = '2.7.667';
var pdfjsBuild = '162577ae4';
var pdfjsVersion = '2.7.669';
var pdfjsBuild = 'bd8c33317';
{
var PDFNetworkStream = __w_pdfjs_require__(153).PDFNetworkStream;

Expand Down Expand Up @@ -11106,7 +11106,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {

return worker.messageHandler.sendWithPromise("GetDocRequest", {
docId: docId,
apiVersion: '2.7.667',
apiVersion: '2.7.669',
source: {
data: source.data,
url: source.url,
Expand Down Expand Up @@ -13544,9 +13544,9 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();

var version = '2.7.667';
var version = '2.7.669';
exports.version = version;
var build = '162577ae4';
var build = 'bd8c33317';
exports.build = build;

/***/ }),
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions projects/ngx-extended-pdf-viewer/src/assets/pdf.sandbox.js

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({

var _worker = __w_pdfjs_require__(1);

var pdfjsVersion = '2.7.667';
var pdfjsBuild = '162577ae4';
var pdfjsVersion = '2.7.669';
var pdfjsBuild = 'bd8c33317';

/***/ }),
/* 1 */
Expand Down Expand Up @@ -213,7 +213,7 @@ var WorkerMessageHandler = /*#__PURE__*/function () {
var WorkerTasks = [];
var verbosity = (0, _util.getVerbosityLevel)();
var apiVersion = docParams.apiVersion;
var workerVersion = '2.7.667';
var workerVersion = '2.7.669';

if (apiVersion !== workerVersion) {
throw new Error("The API version \"".concat(apiVersion, "\" does not match ") + "the Worker version \"".concat(workerVersion, "\"."));
Expand Down Expand Up @@ -30297,6 +30297,15 @@ var AnnotationFactory = /*#__PURE__*/function () {

case "Ch":
return new ChoiceWidgetAnnotation(parameters);

case "Sig":
if (self.showUnverifiedSignatures) {
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
var annotation = new SquareAnnotation(parameters);
annotation.data.fieldType = "Sig";
return annotation;
}

}

(0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + "falling back to base field type.");
Expand Down Expand Up @@ -31121,7 +31130,7 @@ var WidgetAnnotation = /*#__PURE__*/function (_Annotation2) {
if (!self.showUnverifiedSignatures) {
_this4.setFlags(_util.AnnotationFlag.HIDDEN);

console.log("The PDF file contains a signature. Please take into account that it can't be verified yet.");
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
}
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({

var _worker = __w_pdfjs_require__(1);

const pdfjsVersion = '2.7.667';
const pdfjsBuild = '162577ae4';
const pdfjsVersion = '2.7.669';
const pdfjsBuild = 'bd8c33317';

/***/ }),
/* 1 */
Expand Down Expand Up @@ -162,7 +162,7 @@ class WorkerMessageHandler {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.7.667';
const workerVersion = '2.7.669';

if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
Expand Down Expand Up @@ -19560,6 +19560,15 @@ class AnnotationFactory {

case "Ch":
return new ChoiceWidgetAnnotation(parameters);

case "Sig":
if (self.showUnverifiedSignatures) {
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
const annotation = new SquareAnnotation(parameters);
annotation.data.fieldType = "Sig";
return annotation;
}

}

(0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + "falling back to base field type.");
Expand Down Expand Up @@ -20235,7 +20244,7 @@ class WidgetAnnotation extends Annotation {

if (!self.showUnverifiedSignatures) {
this.setFlags(_util.AnnotationFlag.HIDDEN);
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet.");
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
}
}
}
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ var _app_options = __webpack_require__(1);

var _app = __webpack_require__(3);

var pdfjsVersion = '2.7.667';
var pdfjsBuild = '162577ae4';
var pdfjsVersion = '2.7.669';
var pdfjsBuild = 'bd8c33317';
window.PDFViewerApplication = _app.PDFViewerApplication;
window.PDFViewerApplicationOptions = _app_options.AppOptions;

Expand Down Expand Up @@ -13699,7 +13699,7 @@ var BaseViewer = /*#__PURE__*/function () {
throw new Error("Cannot initialize BaseViewer.");
}

var viewerVersion = '2.7.667';
var viewerVersion = '2.7.669';

if (_pdfjsLib.version !== viewerVersion) {
throw new Error("The API version \"".concat(_pdfjsLib.version, "\" does not match the Viewer version \"").concat(viewerVersion, "\"."));
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ var _text_layer = __w_pdfjs_require__(151);

var _svg = __w_pdfjs_require__(152);

var pdfjsVersion = '2.8.121';
var pdfjsBuild = '25f215563';
var pdfjsVersion = '2.8.123';
var pdfjsBuild = '13506341e';
{
var PDFNetworkStream = __w_pdfjs_require__(153).PDFNetworkStream;

Expand Down Expand Up @@ -11106,7 +11106,7 @@ function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {

return worker.messageHandler.sendWithPromise("GetDocRequest", {
docId: docId,
apiVersion: '2.8.121',
apiVersion: '2.8.123',
source: {
data: source.data,
url: source.url,
Expand Down Expand Up @@ -13544,9 +13544,9 @@ var InternalRenderTask = function InternalRenderTaskClosure() {
return InternalRenderTask;
}();

var version = '2.8.121';
var version = '2.8.123';
exports.version = version;
var build = '25f215563';
var build = '13506341e';
exports.build = build;

/***/ }),
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({

var _worker = __w_pdfjs_require__(1);

var pdfjsVersion = '2.8.121';
var pdfjsBuild = '25f215563';
var pdfjsVersion = '2.8.123';
var pdfjsBuild = '13506341e';

/***/ }),
/* 1 */
Expand Down Expand Up @@ -213,7 +213,7 @@ var WorkerMessageHandler = /*#__PURE__*/function () {
var WorkerTasks = [];
var verbosity = (0, _util.getVerbosityLevel)();
var apiVersion = docParams.apiVersion;
var workerVersion = '2.8.121';
var workerVersion = '2.8.123';

if (apiVersion !== workerVersion) {
throw new Error("The API version \"".concat(apiVersion, "\" does not match ") + "the Worker version \"".concat(workerVersion, "\"."));
Expand Down Expand Up @@ -30343,6 +30343,15 @@ var AnnotationFactory = /*#__PURE__*/function () {

case "Ch":
return new ChoiceWidgetAnnotation(parameters);

case "Sig":
if (self.showUnverifiedSignatures) {
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
var annotation = new SquareAnnotation(parameters);
annotation.data.fieldType = "Sig";
return annotation;
}

}

(0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + "falling back to base field type.");
Expand Down Expand Up @@ -31167,7 +31176,7 @@ var WidgetAnnotation = /*#__PURE__*/function (_Annotation2) {
if (!self.showUnverifiedSignatures) {
_this4.setFlags(_util.AnnotationFlag.HIDDEN);

console.log("The PDF file contains a signature. Please take into account that it can't be verified yet.");
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
}
}

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Object.defineProperty(exports, "WorkerMessageHandler", ({

var _worker = __w_pdfjs_require__(1);

const pdfjsVersion = '2.8.121';
const pdfjsBuild = '25f215563';
const pdfjsVersion = '2.8.123';
const pdfjsBuild = '13506341e';

/***/ }),
/* 1 */
Expand Down Expand Up @@ -162,7 +162,7 @@ class WorkerMessageHandler {
var WorkerTasks = [];
const verbosity = (0, _util.getVerbosityLevel)();
const apiVersion = docParams.apiVersion;
const workerVersion = '2.8.121';
const workerVersion = '2.8.123';

if (apiVersion !== workerVersion) {
throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
Expand Down Expand Up @@ -19602,6 +19602,15 @@ class AnnotationFactory {

case "Ch":
return new ChoiceWidgetAnnotation(parameters);

case "Sig":
if (self.showUnverifiedSignatures) {
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
const annotation = new SquareAnnotation(parameters);
annotation.data.fieldType = "Sig";
return annotation;
}

}

(0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + "falling back to base field type.");
Expand Down Expand Up @@ -20277,7 +20286,7 @@ class WidgetAnnotation extends Annotation {

if (!self.showUnverifiedSignatures) {
this.setFlags(_util.AnnotationFlag.HIDDEN);
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet.");
console.log("The PDF file contains a signature. Please take into account that it can't be verified yet. ngx-extended-pdf-viewer also displays forged signatures, so use this feature only if you're sure what you're doing.");
}
}
}
Expand Down
Loading

0 comments on commit a7d3787

Please sign in to comment.