1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

When no "V" entry exists, let the fieldValue fallback to the "DV" entry (issue 13823)

This commit is contained in:
Jonas Jenwald 2021-07-30 16:15:41 +02:00
parent 4ad5c5d52a
commit ff71be793d
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 =