Skip to main content
Raymond_Ford
Participating Frequently
October 26, 2018
Answered

Why does innerDocWindowRect or any of the other window rects work?

  • October 26, 2018
  • 1 reply
  • 1202 views

Of the many many many issues with scripting issues there are with writing code in Acrobat, this one I have not found a work around. How  are we supposed to find the inner document window rec when none of the window rec functions work?

This topic has been closed for replies.
Correct answer Joel Geraci

that is not good at all!!!

very very poor design!!!!

So the user has to wait every time they click a button that requires the rect of the window to be known?

AND why in the hell is that not in the documentation?


It's not poor design. That would imply that someone thought about it. In fact, it wasn't designed at all. It was an unintended consequence of delayed plugin loading which lets Acrobat load faster.

If you put the call to initialize the media object at the document level, it'll be ready by the time the user sees the button and well before they can get the mouse over to it to click it.

1 reply

Joel Geraci
Community Expert
Community Expert
October 26, 2018

This one is odd. You have to initialize the media object first. Then innerAppWindowRect and innerDocWindowRect start working. Add the line below to your code above where you need those properties.

var hack = this.media

Raymond_Ford
Participating Frequently
October 26, 2018

That did not help. still getting undefined