Copy link to clipboard
Copied
In learning and levereging JavaScript inside Acrobat batch-file scripting, I seem to have hit a conceptual brick wall with array methods. I'm speculating that this impasse maybe because some of these methods such as forEach() are not part of the 'core' Javascript.
Searching the web for definitive correlation between Javascript versions and ECMA versions has turned up nothing for me. I realize that I have to filter out and be careful with JavaScript content I am learning which is currently and largely targeting web applicaitons
Referring to Adobe's JavaScript for Acrobat API Reference (SDK Version 8.1 - 2007) on page 35, it says that Acrobat version using Javascript version 1.6. while Acrobat X uses Javascript 1.8 found here.
I ask here if anyone can point me toward discussion that can clarify under the current scope of JavaScript for Acrobat API the core set of allowable generic JavaScript objects and methods?
Thanks
Copy link to clipboard
Copied
From my experience, the documentation can't really be trusted on this. I only use 1.6 features, as I can't presume anything beyond that will work on all versions where the file is likely to be used.
Copy link to clipboard
Copied
I've read here many of your replies Giliad. I have used your experience and suggestion.
So... in regards to Javascript arrays within the scope of version 1.6 can you confirm that all, if not most, array iteration methods are legal functions? (most are callback functions) If so, then I'll have to improve my understanding of them.
Thanks
Copy link to clipboard
Copied
Yes, pretty much. Everything listed here should work:
Copy link to clipboard
Copied
Thanks G. It is the exact document I need. It confirms that iterations should work.