doc.pageWindowRect and doc.media are undefined in Acrobat Javascript
I am trying to use the doc.pageWindowRect information as part of some code I am writing using the Adobe Acrobat Javascript API.
I originally found that doc.pageWindowRect was undefined, and through various posts on this forum, found that I needed to activate the media extension first, by running something like
console.println(this.media);Normally this prints something like:
[object DocMedia]but on some computers used by our client, this just prints 'undefined' instead. It seems that having this.media undefined means that doc.pageWindowRect will stay undefined too.
Does anyone know how to make sure this.media is defined, and thus enable doc.pageWindowRect? Or any other way of getting hold of the doc.pageWindowRect information?
I wondered if there might be a delay in activating the media extension, and have tried repeatedly running code to display this.media and doc.pageWindowRect using app.setInterval, but even after waiting for a couple of minutes, they are still not defined.
Could this be related to the configuration of our client's Acrobat install? It seems to work fine on most other machines that we've tested it on, but there is definitely some sort of problem here.
Any help would be much appreciated.
Thanks,
Robin
