AllInOneYT / react-native-thermal-printer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I play the printer sound

gsolorzanob opened this issue · comments

Hey, I can't find how to play the beep sound while printing.

Any solution?

adding this two lines works for me

printerConnection.write(new byte[]{27, 66, 2, 1});
printerConnection.send(0);

Excuse me, where can I add these lines?

whetther here before printing

or here after printing

or both

The reason it is not included in the library is that printer sound is originally intended for warnings and errors.

Thank u, it works!!!

adding this two lines works for me

printerConnection.write(new byte[]{27, 66, 2, 1});
printerConnection.send(0);

This sound is short. What the params for sound longer or volume greater?

adding this two lines works for me

printerConnection.write(new byte[]{27, 66, 2, 1});
printerConnection.send(0);

This sound is short. What the params for sound longer or volume greater?

you cannot change the volume of the sound as far as I know. refer to this issue DantSu/ESCPOS-ThermalPrinter-Android#142 for more information

adding this two lines works for me

printerConnection.write(new byte[]{27, 66, 2, 1});
printerConnection.send(0);

This sound is short. What the params for sound longer or volume greater?

you cannot change the volume of the sound as far as I know. refer to this issue DantSu/ESCPOS-ThermalPrinter-Android#142 for more information

Thank you!