-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore generating pdfs of form output #226
Comments
As long as we don't need to preserve the format of the original form this seems pretty doable. In fact, I wonder if we really need to go through PDF to get this. The main reason for going PDF would seem to be if we had to stuff the web form data into a predesigned looks-like-paper form. From a quick take it doesn't seem like that library can fill existing forms, it's more for creating one from scratch. Would it be possible to render all the pages inside the browser using a different stylesheet? Basically, the review page with all the sections expanded. We do have |
Yes, agree that this would be pretty simple if we don't need to preserve the format of the original form (maybe this is something we can get more information on from @bernars-usa's investigation into form owners and what formats forms can be submitted to them for manual processing). |
I have more to say on this but can anyone confirm or deny that https://github.com/pdffillerjs/pdffiller is still a thing that people use? I used it a couple years ago with success but it doesn't appear to have been maintained. The thought being that given a fillable PDF template, map JSON to fillable fields and generate the PDF to download -- which is what Vets.gov does in some instances (I believe that's still true) through the rails-based shim layer (via pdf-fill gem or somesuch). |
If vets.gov handles PDFs via server side that makes sense, although that would put it outside the scope of a client-side library like us-forms-system. We could create a PoC on some test server that takes a JSON post plus a form specifier and returns a downloadable filled-out PDF, but actual production usage would depend on the server being used and the back-end language. |
Here are my longer comments, based on existing use cases (heads up @ju-liem)...
I think it's super important to draw clear boundaries around library vs implementation, but I'm not even sure where that line should be in this case. My gut leans this way:
Why? Because while the ideal future is development teams use library and implement it into their flow (e.g. vets.gov and its Rails app and API layer for form data handling), the reality is that a lot of agency first steps are going to be rolling up standalone React apps and having something meaningful happen on form submit is important....and should get them there. |
I'm leaving this open, but during your planning for Phase 2, please take my comment into consideration (#226 (comment)) and then when you figure out what you're going to do, close this and open a new ticket. |
Duplicate of #21, the specifics all depend on specific user needs and we don't know those until there is a specific user. |
Explore the lift involved in generating pdfs of the form output. This could be a useful feature for 2 reasons:
Some teams may not have a back-end API to automatically accept form submissions. If we can still enable users to fill out the form online, print it out, and send it in, we're at least making the form completion process easier and more reliable (catching validation errors and making sure required fields are present) and incrementally upgrading their system.
Some users completing forms may want to print a copy of their submitted information for record-keeping (I've heard this request before from some Vets.gov users). This would enable them to easily save their submission.
Haven't investigated this library, but look into this more: https://github.com/diegomura/react-pdf.
The text was updated successfully, but these errors were encountered: