Fill pdf form
-
Is it possible to pass jsreport a PDF form and separate data and fill out the form? I know the names of the PDF form fields and I have added the PDF form to a jsreport template via a static asset, but I am not sure how to pass in the data to the template to fill the fields or if this is even possible?
Sample: https://playground.jsreport.net/w/echeyne/g9AEWVBf
Thanks,
E
-
It doesn't work this way at this moment. It was designed to add a form field to the new pdfs and eventually pre-fill them. It isn't designed for filling existing pdfs.
You would need to "reimplement" your existing pdf into HTML and use thepdfFormFieldhelpers.
https://jsreport.net/learn/pdf-utils#forms
-
@echeyne what did you end up doing?
-
I’ve run into similar issues with field mapping in the past. If you're looking for a quick way to test the form structure or just need a straightforward way to see how the fields behave before automating the whole thing, I sometimes use this simple tool- https://thetoolapp.com/pdf-tools/fill-pdf-form/. It’s pretty handy for verifying the PDF side of things while you're debugging your jsreport script.