code: function fillPrintersList() {
          var printer = MeadCo.ScriptX.Printing;
          var $printers = $('#fld-printerselect');
  
          $('#fld-printerselect > option').remove();
  
          var name;
          for (var i = 0; (name = printer.EnumPrinters(i)).length > 0 ; i++) {
              $printers.append("<option>" + name);
          }
  
          $printers.val(printer.currentPrinter);
          if ($printers.hasClass("selectpicker")) {
              $printers.selectpicker('refresh');
          }
      }
docs: fill printers dropdown with those available