diff --git a/src/display/xfa_layer.js b/src/display/xfa_layer.js index ab838a945..88c2bada3 100644 --- a/src/display/xfa_layer.js +++ b/src/display/xfa_layer.js @@ -37,6 +37,10 @@ class XfaLayer { ) { if (storedData.value === element.attributes.xfaOn) { html.setAttribute("checked", true); + } else if (storedData.value === element.attributes.xfaOff) { + // The checked attribute may have been set when opening the file, + // unset through the UI and we're here because of printing. + html.removeAttribute("checked"); } if (intent === "print") { break; diff --git a/test/pdfs/xfa_bug1729877.pdf.link b/test/pdfs/xfa_bug1729877.pdf.link new file mode 100644 index 000000000..ac1fe56bf --- /dev/null +++ b/test/pdfs/xfa_bug1729877.pdf.link @@ -0,0 +1 @@ +https://bugzilla.mozilla.org/attachment.cgi?id=9240352 diff --git a/test/test_manifest.json b/test/test_manifest.json index 0f83502a2..b1a9f9a31 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -967,6 +967,21 @@ "enableXfa": true, "type": "eq" }, + { "id": "xfa_bug1729877", + "file": "pdfs/xfa_bug1729877.pdf", + "md5": "1bf5429ea13a090f52edcd49cb0c4a47", + "link": true, + "rounds": 1, + "enableXfa": true, + "type": "eq", + "lastPage": 1, + "print": true, + "annotationStorage": { + "jobReq13847": { + "value": "0" + } + } + }, { "id": "xfa_bug1722038", "file": "pdfs/xfa_bug1722038.pdf", "md5": "95170baaade2ab6e1d0372f35db01747",