Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BuildinEx840 ex840=new BuildinEx840();
- int response=ex840.open();
- System.out.println("ex840 open:"+response);
- byte[] set={'N','A','R','E','S','H','S','H','A','R','M','A',(byte)0x0d,(byte)0x0a};
- try {
- ex840.write(set);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- try{
- response=ex840.getEndStatus();
- System.out.println("getEndStatus:"+response);
- response=ex840.initCutter();
- List<byte[]>printList = new ArrayList<byte[]>();
- printList.add(set);
- ex840.getConverter().cutPaper(printList, 100);
- ex840.close();
- EscType exc;
- exc = LinePrinterConvertBase.EscType.ESC_P;
- //ex840.getConverter().cutPaper(in, percentage);
- exc=LinePrinterConvertBase.EscType.ESC_SP;
- System.out.println("initCutter:"+response);
- }
- catch(Exception e){
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement