Skip to content

Commit

Permalink
stephanrauh/ngx-extended-pdf-viewer#639 now unverified digital signat…
Browse files Browse the repository at this point in the history
…ures 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!
  • Loading branch information
stephanrauh committed Feb 6, 2021
1 parent 20dc69d commit 9ba36e4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/core/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ class AnnotationFactory {
return new ButtonWidgetAnnotation(parameters);
case "Ch":
return new ChoiceWidgetAnnotation(parameters);
// #639 modified by ngx-extended-pdf- viewer
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;
}
// #639 end of modification
}
warn(
'Unimplemented widget field type "' +
Expand Down Expand Up @@ -1035,7 +1046,7 @@ class WidgetAnnotation extends Annotation {
if (!self.showUnverifiedSignatures) {
this.setFlags(AnnotationFlag.HIDDEN);
console.log(
"The PDF file contains a signature. Please take into account that it can't be verified yet."
"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."
);
}
// #171 modification end
Expand Down

0 comments on commit 9ba36e4

Please sign in to comment.