Copy link to clipboard
Copied
I have a pdf document from revenu canada(IRS). I need to create keys in the document so that I can fetch data from my database and use this data to fill in the form by mapping the keys to my data. Can anybody tell me how to do this with ac reader pro?
Copy link to clipboard
Copied
There are a few different ways that data can be imported into a PDF. Karl has outlined two methods. One using an external app and the other a local data file to load data into form fields, but there is a much simpler mechanism that will work with both Acrobat Reader and Pro, which is to use a form submit. A submit performs an HTTP operation and expects the return data to be in a known data format. The returned data is mapped into form fields on the PDF.
To do this you'll need a server side app to get data from the DB, put it in the correct format, and return is as the HTTP response data.
Here are some helpful links:
https://acrobatusers.com/tutorials/submitting-data/
https://www.pdfscripting.com/public/Form-Data-Handling.cfm
Here is the Acrobat JavaScript reference entry for the submit function:
Copy link to clipboard
Copied
Open the file in Adobe Acrobat. What can you see when you use Tools > Prepare Form?
Copy link to clipboard
Copied
I don't understand what you mean by "keys". There is a way to fill in form fields with an external program using the IAC API. Here is a sample that will work in Adobe Acrobat (not the free Reader): http://khkonsulting.com/2010/09/reading-pdf-form-fields-with-vba/
You can also do this by importing a tab separated text file, but that gets a bit more tricky. The best way is to export data from a form first to a text file, and then modify that so that it contains your new data. You will have to make sure that the column names do not change, and that you have exactly the same amount of columns as your exported file.
Copy link to clipboard
Copied
There are a few different ways that data can be imported into a PDF. Karl has outlined two methods. One using an external app and the other a local data file to load data into form fields, but there is a much simpler mechanism that will work with both Acrobat Reader and Pro, which is to use a form submit. A submit performs an HTTP operation and expects the return data to be in a known data format. The returned data is mapped into form fields on the PDF.
To do this you'll need a server side app to get data from the DB, put it in the correct format, and return is as the HTTP response data.
Here are some helpful links:
https://acrobatusers.com/tutorials/submitting-data/
https://www.pdfscripting.com/public/Form-Data-Handling.cfm
Here is the Acrobat JavaScript reference entry for the submit function:
Copy link to clipboard
Copied
I would question the "much simpler" 🙂 I'd rather write VBA code all day long than trying to get stuff on the web to work 🙂
Copy link to clipboard
Copied
Yeah, if you've got it all local, then you're set. But if it's remote anyway, well ya gotta go remote. All depends on where the data resides.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more