Merge pull request #14035 from calixteman/1722036

Annotation - For checkboxes, get field value from AS (if any) instead of V (bug 1722036)
This commit is contained in:
calixteman 2021-09-17 14:59:49 +02:00 committed by GitHub
commit 7082ff9bf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -2083,6 +2083,13 @@ class ButtonWidgetAnnotation extends WidgetAnnotation {
return;
}
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1722036.
// If we've an AS and a V then take AS.
const asValue = this._decodeFormValue(params.dict.get("AS"));
if (typeof asValue === "string") {
this.data.fieldValue = asValue;
}
const exportValues = normalAppearance.getKeys();
if (!exportValues.includes("Off")) {
// The /Off appearance is optional.

View File

@ -0,0 +1 @@
https://bugzilla.mozilla.org/attachment.cgi?id=9232845

View File

@ -5899,5 +5899,13 @@
"rounds": 1,
"lastPage": 1,
"type": "eq"
},
{ "id": "bug1722036",
"file": "pdfs/bug1722036.pdf",
"md5": "bbc7f62ca85609c97069bd3ce2658288",
"rounds": 1,
"link": true,
"forms": true,
"type": "eq"
}
]