简体   繁体   English

在acrobat PDF中添加了关于mouseUp事件的exec javascript

[英]Exec javascript added on mouseUp event in acrobat PDF

This is my action on Acrobat PDF. 这是我对Acrobat PDF的行动。

在此输入图像描述

This is the javascript that i have in there: 这是我在那里的javascript:

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(); 我想在pdf文件级javascript, CalculateNow();上执行这个javascript CalculateNow(); doesn't execute this and its tree hiarchy generated in debugger mode as as such: 不执行此操作,并在调试器模式下生成其树的hiarchy,如下所示:

 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. 经过大量研究后得出的结论是,无法调用通过向导创建的任何操作,包括来自服务器端代码的JavaScript,如C#,即使它是基于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. 然而,有一种替代方法可以找到,即通过发送带有文档级数据的JavaScript变量,并使用这些变量对那些通过向导进行鼠标升级/其他操作的JavaScript来完成所需的输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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