When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823)
This commit is contained in:
parent
4ad5c5d52a
commit
ff71be793d
@ -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 =
|
||||
|
1
test/pdfs/issue13823.pdf.link
Normal file
1
test/pdfs/issue13823.pdf.link
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/mozilla/pdf.js/files/6907771/Formular_T_default.pdf
|
@ -1038,6 +1038,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",
|
||||
|
Loading…
Reference in New Issue
Block a user