First let me tell you where I am now. My requirement is to print a variable length Invoice from Android device. I have done it through “Line print” Mode . I have made a string(printbill) and passed to the printer connection . below is the code.
String printbill = padRight("Invoice(Page No :1)", 22) + padRight("Invoice No: " + appPrefs.getData("Invoice_number"), 22) + padRight("Date : " + mydate, 22) + "\n" + padRight(""+appPrefs.getData("curr_outlet_number"), 66)+"\n" +padRight(""+appPrefs.getData("curr_outlet_ename"), 66)+"\n" + "------------------------------------------------------------------\n" + padRight("SNo.", 4) + padRight("Item Desc", 16) + padRight("Pack", 9) + padRight("Csprice", 9) + padRight("CS", 4) + padRight("OT", 4) + padRight("PC", 4) + padRight("Discpro", 8) + padRight("Value", 8) + "\n" + "------------------------------------------------------------------\n";
String cpclConfigLabel = "! U1 setvar \"device.languages\" \"line_print\"\r\n" // + "! U1 SETLP 5 0 30\r\n" + "! U1 LMARGIN 0\r\n" + printbill + "\r\n"; try { configLabel = cpclConfigLabel.getBytes("US-ASCII");byte[] configLabel = getConfigLabel(); conn.write(configLabel); } I am successful in printing the Invoice. Please check the below Image to view the invoice printed from my Android Device. My requirement is to print Arabic along with this invoice as shown in the below Image . Below each item there is Arabic description also . How I can implement this in Android. ?
ARABIC PRINTING FROM ANDROID -ZEBRARW420// Expert user has replied. |
1 Replies
Hi Mohammed,
The first step is making sure the printer you are working with has the Arabic font installed. You can add a font if the printer has enough memory using Zebra Setup Utilities and this tutorial.