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

Import Data from excel into non-fillable pdf

Guest
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

I am looking for a way to

1. Check if any word on PDF page matches a word in an excel spreadsheet.

2. Copy a corresponding cell's data and place it on the PDF. (not in a form).

 

I'll attach a sample pdf page.

I would like to see if the word Sample appears in the excel sheet and

pull out the corresponding data (Test) and paste it inside. 

Thanks in advance

TOPICS
Acrobat SDK and JavaScript

Views

1.7K

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

correct answers 1 Correct answer

Community Expert , Oct 16, 2020 Oct 16, 2020

You can't do it with an Excel file directly. You will have to first convert it to a plain-text file, like a CSV or a tab-delimited file. Then you'll be able to read its contents using a script, search for matches and then copy that "cell" into the file, for example using a comment. This is not a trivial scripting task, though.

Votes

Translate

Translate
Community Expert ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

You can't do it with an Excel file directly. You will have to first convert it to a plain-text file, like a CSV or a tab-delimited file. Then you'll be able to read its contents using a script, search for matches and then copy that "cell" into the file, for example using a comment. This is not a trivial scripting task, though.

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
Guest
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

Thanks Right I know about the cab part. I assumed that it wouldn't be a simple scripting task but any direction would be a great help. I'm dealing with thousands of pdf pages. Where would I go to find how to do this?

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 ,
Oct 16, 2020 Oct 16, 2020

Copy link to clipboard

Copied

Reading the file can be done using the readFileIntoStream method of the util object. Searching it is just a simple string manipulation. Inserting the result can be done using the addAnnot method to create a comment.

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
Guest
Oct 18, 2020 Oct 18, 2020

Copy link to clipboard

Copied

LATEST

Just wondering, I have much more experience with vba I'm excel. Would it be easier (if possible) to do this sorry of thing through vba?

 

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