//获取签名信息
var oState =event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureValidate();
//Get the field's signed state.
if (oState == 0) {...}
//提交时能否从浏览器打开网页
app.launchURL("http://www.adobe.com",true);
//调用别人的事件
abc.sf2.sf11.lend.execEvent("exit");
一些属性
Scripting > Scripting Reference > Scripting Properties
//执行菜单里面的功能
app.execMenuItem("SaveAs");
//添加另外一个判断button隐藏功能button
var vSignature=event.target.getField("abc[0].ss8[0].companysignature[0]").signatureInfo();
if(vSignature.numRevisions==1){
xfa.host.messageBox("发送回执");
}else{
xfa.host.messageBox("请在“开户单位数字签名”处正确签名后再提交!签名失效请重新签名!");
}
//获取附件并保存
var d = event.target.dataObjects;
if (d != null)
for (var i = 0; i < d.length; i++)
{
event.target.exportDataObject(d[i].name);
}
//去除签名
var signatureField=event.target.getField("abc[0].ss8[0].companysignature[0]");
xfa.signature.clear(signatureField, 0);------待验证没实现
//验证签名是否正确
Reference_Syntax.verify( OBJECT param1 [, BOOLEAN param2 [, OBJECT param3 [, OBJECT param4 ] ] ] )
0 Signature is blank.
1 Unknown status. In this case, no attempt to validate the signature was made. One possible cause is a software or hardware issue that is preventing the validation from occurring.
2 Signature is invalid.
3 Signature is valid, but the identity of the signer could not be verified.
4 Signature is valid and the identity of the signer is valid.
//使用button发送邮件
event.target.submitForm({cURL: "mailto:abc@mail.abc.com”,
bEmpty: true, // Post all fields (true), or do Not post all fields (false)
cSubmitAs: "XDP", // Post XDP format
cCharset: "utf-8"});
event.target.submitForm(cURL:"mailto:abc@abc.com",
bEmpty:true,
cSubmitAs:"PDF",
cCharset:"utf-8"
);
//设置权限
abc.sf2.sf11.borrow.access="protected";
abc.sf2.sf11.lend.access="protected";
abc.sf2.sf11.borrow.access="readOnly";
abc.sf2.sf11.lend.access="readOnly";