Click here to Skip to main content
15,122,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Printer is GoojPRT portable printer PT-210 (thermal printer)

the same code is work on another thermal printer POS but not work on this printer for Arabic characters the English characters is good but the Arabic characters is shown as chinses characters

code for print :

Button btnPrint=(Button)findViewById(R.id.btnPrint);
        btnPrint.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                Thread t = new Thread() {
                    public void run() {
                        try {
                            OutputStream os = mBluetoothSocket
                                    .getOutputStream();
                            BILL = "ENGLISH" + "\n";
                            BILL =  BILL + "العربية" + "\n";
                            BILL = BILL + "---------------" + "\n";
                            
                            os.write(BILL.getBytes( ));
                        } catch (Exception e) {

                        }
                    }
                };
                t.start();
            }
        });



I need to print text not bitmap or image

What I have tried:

try to add encoded as charset " UTF-8 " and not working for Arabic characters
and also tried to Add "ISO-8859-6" encode not working
tried to change the sittings of thermal printer and change code page to "ISO-8859-6" also not working
Posted
Updated 6-Apr-21 4:08am

1 solution

You probably need to talk to the printer manufacturer about this - it's almost certainly a case of the wrong font being used, but how you select a font on the printer will likely depend on the make / model.

Google will find you tech support in your country.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900