How to specify specific printer to print silently using trusted function?


i have trusted function use allow silent printing of form when button clicked. works great.

 

however, specify printer used. using trusted function script colleague , using same form shared location have different printers. of note, using default printer no changes depending on last printed.

 

currently working code is:

sprint = app.trustedfunction(function(bui, bsilent) { app.beginpriv(); this.print(false, false); app.endpriv(); }); 

 

somehow think need add/incorporate this:

var pp = this.getprintparams(); pp.interactive = pp.constants.interactionlevel.automatic; pp.printername = "brother printer"; this.print(pp); 

 

can please advise? thank you.

change trusted function this:

 

sprint = app.trustedfunction(function(doc, pp) { app.beginpriv(); doc.print(pp); app.endpriv(); }); 

 

 

and call so:

sprint(this, pp); 


More discussions in JavaScript


adobe

Comments

Popular posts from this blog

Reader DC

AdobeIDの作り方

Adobe InDesign CC 2017 has stopped working