Merge pull request #13824 from Snuffleupagus/issue-13823

When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823)
This commit is contained in:
Tim van der Meij 2021-07-30 22:48:38 +02:00 committed by GitHub
commit 10a1db6980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -1193,6 +1193,12 @@ class WidgetAnnotation extends Annotation {
});
data.defaultFieldValue = this._decodeFormValue(defaultFieldValue);
// When no "V" entry exists, let the fieldValue fallback to the "DV" entry
// (fixes issue13823.pdf).
if (fieldValue === undefined && data.defaultFieldValue !== null) {
data.fieldValue = data.defaultFieldValue;
}
data.alternativeText = stringToPDFString(dict.get("TU") || "");
const defaultAppearance =

View File

@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/6907771/Formular_T_default.pdf

View File

@ -1046,6 +1046,14 @@
"enableXfa": true,
"type": "eq"
},
{ "id": "issue13823",
"file": "pdfs/issue13823.pdf",
"md5": "8ca53bba9b2c68f5cd87f13a963e6b6a",
"rounds": 1,
"link": true,
"type": "eq",
"forms": true
},
{ "id": "xfa_bug1718521_1",
"file": "pdfs/xfa_bug1718521_1.pdf",
"md5": "9b89dd9e6a4c6c3258ca24debd806863",