Advertisement
Guest User

sdfas

a guest
Apr 5th, 2013
485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.85 KB | None | 0 0
  1. BuildinEx840 ex840=new BuildinEx840();
  2.         int response=ex840.open();
  3.         System.out.println("ex840 open:"+response);
  4.        
  5.         byte[] set={'N','A','R','E','S','H','S','H','A','R','M','A',(byte)0x0d,(byte)0x0a};
  6.         try {
  7.             ex840.write(set);
  8.         } catch (IOException e) {
  9.             // TODO Auto-generated catch block
  10.             e.printStackTrace();
  11.         }
  12.         try{
  13.         response=ex840.getEndStatus();
  14.         System.out.println("getEndStatus:"+response);
  15.         response=ex840.initCutter();
  16.          List<byte[]>printList = new ArrayList<byte[]>();
  17.          printList.add(set);
  18.         ex840.getConverter().cutPaper(printList, 100);
  19.         ex840.close();
  20.         EscType exc;
  21.         exc = LinePrinterConvertBase.EscType.ESC_P;
  22.         //ex840.getConverter().cutPaper(in, percentage);
  23.         exc=LinePrinterConvertBase.EscType.ESC_SP;
  24.         System.out.println("initCutter:"+response);
  25.         }
  26.         catch(Exception e){
  27.             e.printStackTrace();
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement