From 55da4c3da69c9fdbe48b6eff0d2328c7b0846e1a Mon Sep 17 00:00:00 2001 From: Anirudh Varma Date: Tue, 16 Mar 2021 14:19:09 +0530 Subject: [PATCH] Show unverified digital signatures --- src/core/annotation.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/annotation.js b/src/core/annotation.js index e28d12b8218ca..b3adfba0505c8 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -122,6 +122,8 @@ class AnnotationFactory { return new ButtonWidgetAnnotation(parameters); case "Ch": return new ChoiceWidgetAnnotation(parameters); + case "Sig": + return new SquareAnnotation(parameters); } warn( 'Unimplemented widget field type "' + @@ -1051,11 +1053,13 @@ class WidgetAnnotation extends Annotation { // Hide signatures because we cannot validate them, and unset the fieldValue // since it's (most likely) a `Dict` which is non-serializable and will thus // cause errors when sending annotations to the main-thread (issue 10347). - if (data.fieldType === "Sig") { - data.fieldValue = null; - this.setFlags(AnnotationFlag.HIDDEN); - data.hidden = true; - } + // CUSTOMISATION: Until https://github.com/mozilla/pdf.js/issues/1076 is resolved, + // we will render the signature but not verify it. + // if (data.fieldType === "Sig") { + // data.fieldValue = null; + // this.setFlags(AnnotationFlag.HIDDEN); + // data.hidden = true; + // } } /**