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

How to use external data to fill in an existing PDF form in JavaScript?

Community Beginner ,
Apr 19, 2018 Apr 19, 2018

Hi all,

I've got a question which is : I have data from a database, now I need to use the data to fill in a PDF form?

To be more specific, for example, there are "name", "phone number" and "address" fields in my database, I want to catch these data to fill in an existing PDF form. The PDF form also has these three fields. I have no idea about how to implement in JavaScript. Really need some help.

Thank you so much for any suggestion.

Cheers,

Max

TOPICS
Acrobat SDK and JavaScript , Windows
4.9K
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

correct answers 1 Correct answer

Community Expert , Apr 20, 2018 Apr 20, 2018

As was already suggested, you can export your data to a (tab separated) text file and then import that data into a form. If you can add some "glue" functionality to your database server, you might be able to do this with direct access from within a PDF form:

Connect to Database from PDF Form - This Time Without SOAP - KHKonsulting LLC

Getting a Serial Number Into a Form Using SOAP - KHKonsulting LLC

And, if you want to fill out more than one form at a time, take a look here:

Batch-Import Excel Data into PDF Forms - KHKonsulting LLC

...
Translate
Community Expert ,
Apr 20, 2018 Apr 20, 2018

You can't connect directly to a DB from an Acrobat PDF (any longer).

You would need to export the data into a plain-text file and then it would be possible.

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 ,
Apr 20, 2018 Apr 20, 2018

As was already suggested, you can export your data to a (tab separated) text file and then import that data into a form. If you can add some "glue" functionality to your database server, you might be able to do this with direct access from within a PDF form:

Connect to Database from PDF Form - This Time Without SOAP - KHKonsulting LLC

Getting a Serial Number Into a Form Using SOAP - KHKonsulting LLC

And, if you want to fill out more than one form at a time, take a look here:

Batch-Import Excel Data into PDF Forms - KHKonsulting LLC

Batch-Import List Data into PDF Form - KHKonsulting LLC 

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 Beginner ,
Apr 25, 2018 Apr 25, 2018

Hi Karl,

Thank you for your reply. I am still having a question that seeks some suggestions.

In the link of "Batch-Import list data into pdf form", I can understand that in the code part, it is to create a temporary document to store the data from txt file. But I can not find how to import that existed pdf "sign-in sheet" and how to generate that pdf form to be ready to download. I mean, how to get this generated pdf "sign-in sheet", I am a little bit confused because I am still a beginner for javascript currently.

Really appreciate for your help.

Changjian

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 ,
Apr 26, 2018 Apr 26, 2018
LATEST

I see that you've posted a separate question and already received a lot of information, so I will not comment on this any further.

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