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

Thoughts on integrating spreadsheet data into PDF functionality

Community Expert ,
Aug 31, 2017 Aug 31, 2017

This is not a specific question, rather looking for ideas on possible ways to handle the following scenario.

I have created a PDF that automates the task of printing variable data for labels. User selects from a drop down, which will produce results in three additional fields.

Select: Option 1 > Results: A,C,D

Select: Option 2 > Results: B,E,F

Select: Option 3 > Results: A,C,F

The above results are performed with a custom calculation script. This functionality works fine. If modifications are necessary to results, this is made to the calculation script.

All of the data for Options and Results are in an external spreadsheet. Currently, modifications are made first to the spreadsheet, then communicated, then changes made to the script.

So, is there any way to bridge or connect the data from the spreadsheet, into Acrobat, and into the script in some automated manner? This question is open to accomplishing this task outside of Acrobat. Performing the entire task in Excel was considered. TIA for any ideas or thoughts.

TOPICS
PDF forms
861
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 ,
Aug 31, 2017 Aug 31, 2017

It's a bit complicated. You would need to read the external file using the readFileIntoStream method of the util object, or by importing the file as a data object and then read its contents, using methods such as importDataObject and getDataObjectContents.

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 ,
Aug 31, 2017 Aug 31, 2017

It can certainly be done entirely from within Acrobat, using custom-made scripts.

The data file will have to be saved as a plain-text file, though, and its location will have to be known in advance (or you will need to select it manually when running the script). You would also need to install a script on the local machine (ie, not just in the file itself).

If all of that is possible in your case, then it can be achieved.

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 ,
Aug 31, 2017 Aug 31, 2017

Thanks for the quick response. Can you elaborate on the script on the local machine?

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 ,
Aug 31, 2017 Aug 31, 2017

It's a bit complicated. You would need to read the external file using the readFileIntoStream method of the util object, or by importing the file as a data object and then read its contents, using methods such as importDataObject and getDataObjectContents.

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 ,
Aug 31, 2017 Aug 31, 2017

Thanks again, the level of coding required to accomplish that task probably exceeds the feasibility.

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 ,
Aug 31, 2017 Aug 31, 2017
LATEST

I've created several similar scripts in the past for my clients, and could do the same for you, if you're interested.

You can contact me to discuss it privately at try6767 at gmail.com.

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