Skip to content

Commit e136afb

Browse files
authored
Merge pull request #14218 from janekotovich/subform_min_0
XFA subform with occur min=0 and no bound data displaying.
2 parents 8222d65 + 56b5023 commit e136afb

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

src/core/xfa/bind.js

+7
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ class Binder {
635635
/* skipConsumed = */ this.emptyMerge
636636
).next().value;
637637
if (!match) {
638+
// If there is no match (no data) and `min === 0` then
639+
// the container is entirely excluded.
640+
// https://www.pdfa.org/norm-refs/XFA-3_3.pdf#G12.1428332
641+
if (min === 0) {
642+
uselessNodes.push(child);
643+
continue;
644+
}
638645
// We're in matchTemplate mode so create a node in data to reflect
639646
// what we've in template.
640647
const nsId =

test/pdfs/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@
213213
!issue4402_reduced.pdf
214214
!issue845r.pdf
215215
!issue3405r.pdf
216+
!issue14130.pdf
216217
!issue7339_reduced.pdf
217218
!issue3438.pdf
218219
!issue11403_reduced.pdf

test/pdfs/issue14130.pdf

77.8 KB
Binary file not shown.

test/test_manifest.json

+7
Original file line numberDiff line numberDiff line change
@@ -4402,6 +4402,13 @@
44024402
"link": false,
44034403
"type": "eq"
44044404
},
4405+
{ "id": "issue14130",
4406+
"file": "pdfs/issue14130.pdf",
4407+
"md5": "82e7efb0a10122e793fc64348d93dc4e",
4408+
"enableXfa": true,
4409+
"rounds": 1,
4410+
"type": "eq"
4411+
},
44054412
{ "id": "issue6151",
44064413
"file": "pdfs/issue6151.pdf",
44074414
"md5": "926f8c6b25e6f0978759f7947d70e079",

0 commit comments

Comments
 (0)