7 Replies Latest reply on Nov 25, 2016 3:38 AM by richbraithwaite

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

    richbraithwaite

      I have a trusted function that I use to allow silent printing of a form when a button is clicked. Works great.

       

      However, would like to specify the printer that is used. Would like to do this using trusted function script as colleague and I using same form from shared location have different printers. Of note, using default printer is no good as that changes depending on what was last printed.

       

      Currently my working code is:

      sPrint = app.trustedFunction(function(bUI, bSilent)
      {
      app.beginPriv();
      this.print(false, false);
      app.endPriv();
      });
      

       

      Somehow I think I need to add/incorporate this:

      var pp = this.getPrintParams();
      pp.interactive = pp.constants.interactionLevel.automatic;
      pp.printerName = "Brother printer";
      this.print(pp);
      

       

      Can anyone please advise? Thank you.