2 Replies Latest reply on Jun 16, 2014 2:56 PM by Peter Arcuri

    RhoElements Scan and Print issue

    Peter Arcuri

      Wondering if anyone came across an issue with the scanner in RhoElements shared runtime 4.1 for WinCE on a MC92N0 device with printing capabilities. I've never had any issues with my javascript scanning function until including print methods. In fact both functionalities work fine independently but when merged I get a scan lockup immediately after printing to the portable printer.


      I launch RhoE and scan a barcode without any issues. Then I print a label to a QL320 printer without any issues. But now my scanner trigger does not response. I've repeat execution of enableScanner() function immediately following a print and that seams to execute. But when pulling the trigger it doesn't make it to the callback onBarcodeEvent(). Any one would see from the code below that its pretty much straightforward: the ensableScanner() function executes upon page onload and printLabel() is called by a label prep function.


      printLabel = function(format, copies) {



                  copies = 1;

            for(var i = 0; i < copies; i++)


                  if(apd.PSExternalEx(266, format) > 0)                          

                        //return nb.PSGetLastMessage();





            var navto = enableScanner(); //added this line in case the scanner disabled by the print function

            return true;


      function enableScanner()


          var defaultScanner = Rho.Barcode.getDefault();

          defaultScanner.allDecoders = true;


          Rho.Barcode.enable({}, onBarcodeEvent);


      function onBarcodeEvent(barcode)


          document.getElementById('barcode-data').value = barcode.data;



      All comments are welcome!