我有一个可信任的功能,可以将文件保存到我的网络打印机。但它不起作用,我收到此错误:“该文件可能是只读的,或者其他用户可能打开它。请使用其他名称或不同的文件夹保存文档。” 这是我的代码:
var xerox = app.trustedFunction( function()
{
app.beginPriv();
var xeroxPath = "\\\out\\spool\\print\\Xerox\\";
this.saveAs(xeroxPath + this.documentFileName);
app.alert("PDF is sent to the printer",3)
app.endPriv();
});
答案 0 :(得分:0)
好的,我找到了解决方案。在Windows中将“\\ out \ spool \ print \ Xerox \”映射到新的网络驱动器。在我的情况下,我将它映射到X:所以代码变为:
var xerox = app.trustedFunction( function()
{ app.beginPriv();
var xeroxPath = "x:\\";
this.saveAs(xeroxPath + this.documentFileName);
app.alert("PDF is sent to the printer",3)
app.endPriv();
});