Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks for the quick response. Can you elaborate on the script on the local machine?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thanks again, the level of coding required to accomplish that task probably exceeds the feasibility.
Copy link to clipboard
Copied
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.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now