Support 'flat' form field names in PDF loading
Normally field names in hierarchical format e.g. Survey.SchoolName, Enrol.Data.R01.C02.M imply a “real” hiarchy in the PDF expressed as ‘parents’ and ‘kids’ ( in PDF parlance).
hyperref for LatEx does not observe this condition and creates “flat” fields with no parents and the name with embedded dots.
This creates a faulty Xfdf on export; the survey uploader ( and a model for any potential pdf processing) works by treating the hierarchical data under each direct child of the fields node as a coherent data set that can be updated with one stored procedure (see Process in PdfSurvey.cs)
We can support such faulty field collections by reformatting them to reclaim the parent/child relations based on the positions of dots.
This is a precondition to moving to generation of Pdf Surveys (and other tools) using LatEx
Comments (7)
-
reporter -
reporter In practice we won't have input as badly structured as above: either the editing tool will support hierarchy or it won’t. LatEx / hyperref does not; so all form fields will be represented by bottom level fields whose names are the full path.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to open
-
reporter - changed status to resolved
task(pdf survey): Enhance loading of Pdf and Xfdf files to suppport 'flat' (ie dot-delimited) field names
Resolves
#1391→ <<cset d7ae89c2b011>>
-
reporter feat(pdfsurvey): demonstration of simple working generate/prepopulate of form. Support for form name hierarchy based on ! delimiters, in both generate and upload
→ <<cset 1f0e8c1da142>>
-
reporter - Log in to comment
Here’s a mockup of a messay fiel that includes some real hierarchy and some implicit hierarchy:
Desired result after loading is to have all the dots in field names replaced with nested fields: