Add a container for Signature with their own canvas

This commit is contained in:
Calixte Denizet 2023-06-15 13:01:01 +02:00
parent 9af50dc358
commit be25ee12bb
4 changed files with 17 additions and 0 deletions

View File

@ -100,6 +100,8 @@ class AnnotationElementFactory {
return new PushButtonWidgetAnnotationElement(parameters);
case "Ch":
return new ChoiceWidgetAnnotationElement(parameters);
case "Sig":
return new SignatureWidgetAnnotationElement(parameters);
}
return new WidgetAnnotationElement(parameters);
@ -1373,6 +1375,12 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
}
}
class SignatureWidgetAnnotationElement extends WidgetAnnotationElement {
constructor(parameters) {
super(parameters, { isRenderable: !!parameters.data.hasOwnCanvas });
}
}
class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {
constructor(parameters) {
super(parameters, { isRenderable: parameters.renderForms });

View File

@ -600,3 +600,4 @@
!issue16500.pdf
!issue16538.pdf
!freetexts.pdf
!issue16553.pdf

BIN
test/pdfs/issue16553.pdf Executable file

Binary file not shown.

View File

@ -7806,5 +7806,13 @@
"id": "53R"
}
}
},
{
"id": "issue16553",
"file": "pdfs/issue16553.pdf",
"md5": "9b67d31ccfd21572b10f77c5449ce97d",
"rounds": 1,
"type": "eq",
"annotations": true
}
]