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

java script for button to load CSV into fields

New Here ,
Mar 20, 2019 Mar 20, 2019

Copy link to clipboard

Copied

Hi,
I don't know java script, but some where along my path someone gave me the simple java script for my button to load  previously saved PDF data back into a PDF.
Could someone let me know if there is also a simple script to load CSV data into a PDF and what it is?

thanks for all your help

TOPICS
Acrobat SDK and JavaScript

Views

1.0K

Translate

Translate

Report

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 ,
Mar 20, 2019 Mar 20, 2019

Copy link to clipboard

Copied

Try this command:

this.importTextData();

Votes

Translate

Translate

Report

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
New Here ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

I saved the CSV file from Excel using the format you mentioned in this Post and made the button but nothing happened.

Then I tried to import it into the PDF via Tools - Forms - More Form Options - Import Data and got the error "could not load data from text file

PDF

CSV

Votes

Translate

Translate

Report

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 ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

LATEST

The format of the file needs to be two rows, with the field names in the first and the values in the second.

You seem to have multiple rows, which is OK, but you'll only be able to import one of them.

Also, I would remove the first column since it doesn't have a field name in it.

And you need to make sure that the names of the fields in the CSV file match those in the PDF exactly, including lower/upper-case letters.

Votes

Translate

Translate

Report

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