用Acrobat JavaScript关闭PDF

function openCheck()
{
if (!this.external)
{
app.alert("Acrobat
では実行できません
");
this.closeDoc(true);

// var myDoc = event.target;

// myDoc.closeDoc(true);
}
}
openCheck();

 

需要注意的是:

1. 上述的source只能在PDF Acrobat Reader打开时才起作用,

如用IE等打开时会报NotSuportedErr错误.

2. 如何判定PDF是用Acrobat Reader打开,还是用IE打开的方法

this.external = True    (IE等打开)

this.external = False   (Acrobat Reader打开)

 

具体参阅:http://www.openspc2.org/reibun/Acrobat7/javascript/doc/010/index.html

你可能感兴趣的:(JavaScript,function,IE)