Copy link to clipboard
Copied
Currently I have quite a bit of data in my JavaScript and would like to tidy this up a bit and maintain it through maybe a spreadsheet. If there anyway to import this data into my PDF's without keeping it in the JavaScript? The data does change depending on variables within the PDF so I'm not sure how that would work with this. For example if x is written in this box, the value in another box would be Blue, if y is written the value should be Red.
Any suggestions?
Copy link to clipboard
Copied
It's possible to use an external data source and then read it using a script, parse it and use the values from it later on.
The file has to be in a known location and must be a plain-text file, though, for the script to be able to read it.
You can use the util.readFileIntoStream method for reading the file, for example.