1 Reply Latest reply on Jun 15, 2017 9:13 AM by Samantha Corn

    ARABIC PRINTING FROM ANDROID -ZEBRARW420

    Mohammed Shah

      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. 
      invoice_1.jpg
        My requirement is to print Arabic along with this invoice as shown in the below Image . Below each item there is Arabic description also .
      invoice_required.jpeg
      How I can implement this in Android. ?