Skip to main content
Maja96
Participant
January 28, 2020
Question

Copy specific text from CSV file into text fields in PDF

  • January 28, 2020
  • 2 replies
  • 560 views

Hello,

I have a question I can't find anywhere in google. Is there any way I can copy text from CSV file into specific text fields into PDF using JavaScript? I need this beacuse I want others to have allways updated version of PDF file so everytime I have to change something I change it in that CSV file not in the code. PDF file has Drop down menu which changes text in text fields on selection and is easily done with JavaScript Actions, but as I said I dont want to change that in code, but in some CSV file when needed. Thanks in advance!

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
January 28, 2020

You can read a bit about data handling in Acrobat Here:

https://www.pdfscripting.com/public/Form-Data-Handling.cfm

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
try67
Community Expert
Community Expert
January 28, 2020

It's possible to do it, but it's tricky to implement. First of all, the CSV file will have to be located in a known and shared location for all users. Also, you would have to embed a script in the file to load the data from it when opened, as well as installing a script on the local machine for the code to read the external file. If all of that is possible in your case then it should be possible.