if (markB.length() > 15) {
markB = markB.substring(0, 15);
}
try{
DocPrintJob job = psZebra.createPrintJob();
String buff =
"N\n" +
header[0] + pixA[0] + "," + pixB[0] + ",0,1,1,1,N,\"Grupo Total 99 C.A.\"\n"+
"A" + pixA[1] + ",15,0,1,1,1,N,\"RIF: J-31150187-8\"\n"+
"A" + pixA[2] + ",40,0,4,1,2,N,\""+ price +"\"\n"+
"A" + pixA[3] + ",45,0,4,1,1,N,\"Bs.\"\n"+
//"A" + separations[4] + ",80,0,3,1,1,N,\""+mark+"\"\n"+
"A" + pixA[5] + ",100,0,1,1,1,N,\""+description+"\"\n"+
"A" + pixA[6] + ",115,0,1,1,1,N,\""+description2+"\"\n"+
"A" + pixA[7] + ",140,0,1,1,1,N,\""+date + "\"\n"+
"A" + pixA[8] + ",160,0,1,1,1,N,\""+barCode +"\"\n"+
"A" + pixA[9] + ",180,0,1,1,1,N,\"" +"AGENCIA " +Shared.getConfig("storeName") +"\"\n"+
"B" + pixA[10] + ",130,0,1,1,2,100,N,\"" + barCode + "\"\n"+
"A" + (offset+pixA[0]) +",0,0,1,1,1,N,\"Grupo Total 99 C.A.\"\n"+
"A" + (offset+pixA[1]) + ",15,0,1,1,1,N,\"RIF: J-31150187-8\"\n"+
"A" + (offset+pixA[2]) + ",40,0,4,1,2,N,\""+priceB +"\"\n"+
"A" + (offset+pixA[3]) + ",45,0,4,1,1,N,\"Bs.\"\n"+
//"A" + (offset+separations[4]) + ",80,0,3,1,1,N,\""+mark+"\"\n"+
"A" + (offset+pixA[5]) + ",100,0,1,1,1,N,\""+descriptionB+"\"\n"+
"A" + (offset+pixA[6]) + ",115,0,1,1,1,N,\""+description2B+"\"\n"+
"A" + (offset+pixA[7]) + ",140,0,1,1,1,N,\""+date + "\"\n"+
"A" + (offset+pixA[8]) + ",160,0,1,1,1,N,\""+barCodeB +"\"\n"+
"A" + (offset+pixA[9]) + ",180,0,1,1,1,N,\""+"AGENCIA " +Shared.getConfig("storeName") +"\"\n"+
"B" + (offset+pixA[10]) + ",130,0,1,1,2,100,N,\"" + barCodeB + "\"\n"+
"P1\n";
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
Doc doc = new SimpleDoc(buff.getBytes(), flavor, null);
job.print(doc, null);
} catch (PrintException ex) {
MessageBox msb = new MessageBox(MessageBox.SGN_DANGER, "Problemas con la impresora.",ex);
msb.show(Shared.getMyMainWindows());
}
}