Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to add keys to a fillable pdf document

New Here ,
Jan 20, 2022 Jan 20, 2022

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?

TOPICS
PDF forms
1.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Jan 20, 2022 Jan 20, 2022

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:

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

Open the file in Adobe Acrobat. What can you see when you use Tools > Prepare Form?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

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:

https://opensource.adobe.com/dc-acrobat-sdk-docs/acrobatsdk/html2015/index.html#t=Acro12_MasterBook%...

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022

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 🙂 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 20, 2022 Jan 20, 2022
LATEST

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. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines