Merge pull request #17066 from Snuffleupagus/issue-17064
Ensure that readonly TextWidget-annotations are rendered when forms are disabled (issue 17064)
This commit is contained in:
commit
4245d87de5
@ -1159,6 +1159,7 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
||||
constructor(parameters) {
|
||||
const isRenderable =
|
||||
parameters.renderForms ||
|
||||
parameters.data.hasOwnCanvas ||
|
||||
(!parameters.data.hasAppearance && !!parameters.data.fieldValue);
|
||||
super(parameters, { isRenderable });
|
||||
}
|
||||
@ -1497,6 +1498,10 @@ class TextWidgetAnnotationElement extends WidgetAnnotationElement {
|
||||
element.textContent = this.data.fieldValue;
|
||||
element.style.verticalAlign = "middle";
|
||||
element.style.display = "table-cell";
|
||||
|
||||
if (this.data.hasOwnCanvas) {
|
||||
element.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
this._setTextStyle(element);
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -119,6 +119,7 @@
|
||||
!issue7891_bc0.pdf
|
||||
!issue11242_reduced.pdf
|
||||
!issue16176.pdf
|
||||
!issue17064_readonly.pdf
|
||||
!issue11279.pdf
|
||||
!issue11362.pdf
|
||||
!issue13325_reduced.pdf
|
||||
|
BIN
test/pdfs/issue17064_readonly.pdf
Normal file
BIN
test/pdfs/issue17064_readonly.pdf
Normal file
Binary file not shown.
@ -3143,6 +3143,13 @@
|
||||
"link": true,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue17064_readonly",
|
||||
"file": "pdfs/issue17064_readonly.pdf",
|
||||
"md5": "cb84f8e8301e935a3b9ea8ef320f45bf",
|
||||
"rounds": 1,
|
||||
"type": "eq",
|
||||
"annotations": true
|
||||
},
|
||||
{ "id": "issue12714",
|
||||
"file": "pdfs/issue12714.pdf",
|
||||
"md5": "f9ee31c74f9e342e95122b0b3bc84fa0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user