简体   繁体   中英

Exec javascript added on mouseUp event in acrobat PDF

This is my action on Acrobat PDF.

在此输入图像描述

This is the javascript that i have in there:

var showHide = event.target.isBoxChecked(0)?display.visible:display.hidden;
this.getField("HideThis").display = showHide;

I want to execute this javascript on pdf open at document level javascript, CalculateNow(); doesn't execute this and its tree hiarchy generated in debugger mode as as such:

 Checkbox1

      -  Annot1

         - Mouseup

            - Action1

after a vast research, the conclusion is that this it is not possible to invoke any actions created via wizard including JavaScript from server side Code such as C#, even if it is an action based on JavaScript. However there is an alternative way which was found and that is by sending over JavaScript variables carrying data on document level and use these variables on on those JavaScript that are mouse-up/Other actions via Wizard to accomplish the desired output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM