Send file to Network Printer by Javascript
I have a trusted function that saves a file to my network printer. But it doesnt work, I get this error:
"The file may be read-only, or another user may have it open. Please save the document with a different name or in a different folder."
This is my code:
// Xerox = Send the file to the Xerox Printer
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();
});
