OpenPDF
OpenPDF copied to clipboard
XFA - Duplicated subform tag and pages in the Form DOM
When filling a specific dynamic form's field, the resulting file goes from 6 to 11 pages. Pages 7 to 11 are duplicates of pages 2 to 6, with some data discrepancies.
I investigated the file's XML, and noticed some things:
- the
<form>
tag (form DOM, not within the template)- is not initially empty, it contains one instanceManager+subform (of 1 field with value override) and the pageSet (6 pages)
-
after filling the file with OpenPDF, it contains two subforms of the same name, and 11 pages in the pageSet. ==> possible error from OpenPDF?
- the second subform contains all fields, with basic validate tags
- the first subform is the same PLUS one hard coded value for one field A
- when filling by hand, regarding field A
- the value is stored in the form DOM and missing from the Data DOM, while other fields are correctly stored in the dataset.
I have no idea why (1) the data is not stored in dataset when filling by hand and (2) the pages get duplicated, but I am starting to believe the later might be from an OpenPDF error.
Any idea of why this is happening and how to fix it (beyond 'avoid the bad field') is welcome.
System :
- OS: macOS 11
- openPDF version: 1.3.26 (tested with 1.3.27 too, still same issue)
- pdf viewer: recent Adobe Acrobat Reader