3 Replies Latest reply on Jul 21, 2015 11:00 AM by Jason Williams

    DS9808 Signature Capture JPEG issues

    Jason Williams

      Hi folks,


      I'm writing a JPOS application that is listening to Signature Capture bar code scanner results and my DS9808 is only sending back a valid JPEG about one in every three scans. Am I possibly doing something wrong.


      I've scanned the barcode for USB (IBM Hand-held), Enable Signature Capture and JPEG Signature Format (although it's the default) and I'll include some code below.


      public class Listen implements DirectIOListener, DataListener, ErrorListener, StatusUpdateListener{

      public void dataOccurred(DataEvent de) {



                  if(type == 501){


                          System.out.println("Bytes size start " + bytes.length);

                          byte typeByte = bytes[0];

                          System.out.println("typeByte " +typeByte);

                          byte sigType = bytes[1];

                          System.out.println("sigType " +sigType);

                          byte[] size = new byte[]{bytes[2], bytes[3], bytes[4], bytes[5]};

                          byte[] image = Arrays.copyOfRange(bytes, 6, bytes.length);

                          String base64 = Base64.encode(bytes);

                          System.out.println("Bytes size end " + image.length);


                          String s = new String(image);

                          FileOutputStream outputFile = new FileOutputStream("C:\\Users\\jwilliams\\Desktop\\output" + System.currentTimeMillis() + ".jpg");

                          OutputStreamWriter outputSW = new OutputStreamWriter(outputFile, "ISO-8859-1");




                          System.out.println("File Closed");

                          sendBeepCode(scn, "20");




      Thanks for any help in advance!