I need code which can perform 2 separate operations:
1) take JSON data (form definition AND form data) and create a fillable PDF form
2) take this same PDF form back and parse it out and create a JSON object with the data filled into the form
The process can be written using either Node.js or PHP. It's fine (and even preferred) to use existing libraries such as pdf2json for Node.js.
No user interface or experience is required. The data/file will be passed in/out as data.
I do need to be able to support a variety of form field types, including:
* single line text
* multi line text
* multi-select list
* single select list
It would be great to be able to have data validation included in the PDF but this is not 100% required.
Clarification #1: Any data validation added (again, very useful but optional) would need to be INSIDE the fillable PDF form, not during upload/download of the form+data. The users would need to get feedback in real time when filling out the PDF form, which would happen when they are offline. PDF fillable forms does support this, at least to some extent.
Clarification #2: There have been some comments/questions about why we want to do things this way. We are trying to build an integration between multiple similar systems from different vendors that gather applications with similar data and users who must work 100% offline to fill in those application. The JSON will be used on the server side to interface with APIs from multiple vendors. The PDFs will be used by users in various parts of the world with limited internet access and on older computers to complete applications which will be passed to one or more of the different vendor systems. The system that handles this user experience and integration is a different (much larger) project and is currently underway. We ma also want some amount of additional help with that system at some point, but that is not in scope for this project.