Closed YudizAndroidHardik closed 1 year ago
Keep in mind that the print codes are sent by the package esc_pos_utlis_plus it may be that it is sending some type of code that causes it to leave a space at the end, you can try another similar package to see if the problem persists on that printer
@andresperezmelo Thank you for your response,
Yes agree with you, codes are sent by another package but I am assuming that this is an issue with the connection and I have facing this issue on this device only, other printers are working as expected
The reason for assuming this is that when I pass the command to print another package that comes into the process, the rest things are managed by our lib
It I let it be connected for 1 hour it will auto print 1-2 lines at every 2-3 mins.
Diving in the issue and trying to solve this
As you say, it works for other printers, each printer manufacturer manages the services offered by Bluetooth, it may be how it manages the codes that are sent to the printer, it may also be that the Bluetooth device offers a special service to connect, in The package uses the generic service to send data, in IOS two services are used, the generic and another service, your case would be a unique case of your device, to emulate the problem here you would have to have the same Bluetooth printer, which you could understand I can't buy that many printers, I have managed 3 58 mm printers and one 80 mm printer and I don't have that problem.
I don't know if your problem is Android or IOS, I think it must be Android, another option is to send the printer reset code after each print.
The packet uses the bytes to reset ASCII 27 64 10
In dart you can send yourself codes to reset it
List<int> reset2 = [27, 64, 10];
await PrintBluetoothThermal.writeBytes(bytes)
other codes I could try
Epson
[27, 69]
[27, 64]
HP
[27, 69]
[27, 37, 48]
Canon [27, 91, 75, 49, 65] [27, 91, 75, 50, 65]
Brother [27, 91, 75, 49, 65]
Zebra [27, 64] [27, 91, 75, 49, 65]
Toshiba [27, 64]
Star [27, 64]
It may be helpful to reset the printer in case it does not recognize a correct code, which may probably be your problem.
I am using QSPrinter and facing auto feed paper after every 2 mins
Below are steps for reproducing this issue
Can anyone help out with this, please?