Expand my Community achievements bar.

Find State of the Annotes panes

Avatar

Level 6

Hi There,

            We have need to determine state of Annotes and Attachment panes open/close with every document open and do some actions based on that state. Here is the script that toggles app.execMenuItem("ShowHideAnnotManager") notes/Comments panel. But we need to determine the state of the pane before we run this script. Any help is appreciated

Thank you,

Varma

3 Replies

Avatar

Level 6

There's nothing documented that will give you access to this information.

Avatar

Level 10

You can read/write of the viewState object.

When you enter this.viewState.toSource(); into the JavaScript console of Acrobat, you get the view states returned.

This will look like:

You also can control this object with JavaScript from Designer.

Here a sample form:

http://thelivecycle.blogspot.com/2010/04/xfa-form-control-view-settings.html

But not all panes can be controlled this way.

And, since Acrobat/Reader X some other methods are also possible to use.

Avatar

Level 6

You got some helpful hints...however we failed to achieve what we want. In out case in Acrobat 9.1.0 the Comments/Annotes pane opens after all the events on the form open process completes. This is an Import as Artwork form originally designed in Acrobat PDFWriter 4.0 for windows...which carried the comments when imported but failed to reproduce what it was doing before the import. In fact we tried popup message in docReady event of highest Hierarchy event just for understanding the sequence of events.....we get the popup message and then this comment/annotes pane opens up. All we are trying is to instruct the application to not to open this pane...unfortunately not successful so far.

event.target.pane = "";     // Close all panes

event.target.pane = "D";     // Close all panes
can help close the pane once it is displayed...we are trying stop from being displayed. Any other suggestions?

Thanks anyway,

Regards,

Varma