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

Merge pull request #14218 from janekotovich/subform_min_0

XFA subform with occur min=0 and no bound data displaying.
This commit is contained in:
calixteman 2021-11-05 04:12:34 -07:00 committed by GitHub
commit e136afbabc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View file

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