I have an array of objects that need to be persistent. I have read that saving complex data can't be done as is but can be saved if in a string format. Any help in this area will be greatly appreciated. Also is there a special location to make this data persistent ie: global.setPersistent()?
Yes, global.setPersistent(cVariable, bPersist). For example:
global.myText = "abc";
As for the array, that's true. You can only set string objects as persistent. You can use the toSource method to convert any object to a string, though, and then eval to convert it back to an object.
With Acrobat DC, you can use JSON.stringify() and JSON.parse() instead of toSource() and eval().
I store my complex data as strings... of JSON... which allows me to use a single string to store all kinds of stuff.
Also, there is a global object but with the default security settings, only the document that set the value can retrieve the value.
Thanks!! Where does the persistent data get saved (shitdows)?