From 516aea5562bbccd3be20d8bcc3e7993ffd7f00c9 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Fri, 21 Nov 2025 17:53:38 +0100 Subject: [PATCH] [XFA] Set default max value in occur tag to -1 (bug 1998843) --- src/core/xfa/template.js | 2 +- test/pdfs/xfa_bug1998843.pdf.link | 1 + test/test_manifest.json | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/pdfs/xfa_bug1998843.pdf.link diff --git a/src/core/xfa/template.js b/src/core/xfa/template.js index 7e7eaac4b..61322dcd9 100644 --- a/src/core/xfa/template.js +++ b/src/core/xfa/template.js @@ -3899,7 +3899,7 @@ class Occur extends XFAObject { attributes.max !== "" ? getInteger({ data: attributes.max, - defaultValue: 1, + defaultValue: -1, validate: x => true, }) : ""; diff --git a/test/pdfs/xfa_bug1998843.pdf.link b/test/pdfs/xfa_bug1998843.pdf.link new file mode 100644 index 000000000..a11e52686 --- /dev/null +++ b/test/pdfs/xfa_bug1998843.pdf.link @@ -0,0 +1 @@ +https://bugzilla.mozilla.org/attachment.cgi?id=9525217 diff --git a/test/test_manifest.json b/test/test_manifest.json index f864c2be9..ac99e5ecb 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -13067,5 +13067,15 @@ "type": "extract", "includePages": [0], "pageMapping": { "1": 1 } + }, + { + "id": "xfa_bug1998843", + "file": "pdfs/xfa_bug1998843.pdf", + "md5": "b7b25e5b05b2b903d0a6727c9f962a91", + "link": true, + "rounds": 1, + "enableXfa": true, + "lastPage": 1, + "type": "eq" } ]