-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printing not smooth, it can't print with a large byte array #5
Comments
Hi @xfiremen , |
Hi @andrey-ushakov, New result: I have tried it with more printers. Some big printer work well. You should buy some CHINA printer and test on it. I thought it belong to printer. Some device has small memory, that can not handle big message. Solution: I splitted my ticket message into more parts. With max-size 100 bytes/ packet. Can you support it on your method WriteBytes. On react-native I am using under library. (https://github.com/innoveit/react-native-ble-manager) |
Actually I've tested on 3 cheap small Chinese Bluetooth printers and it looks like it works. |
Yes, you are absolutely right about splitting the data. Normally we should use 20 bytes chunks (it's also the default value in the package you mentioned). In the latest version, I'm splitting the data and using the sleep function before calling the platform-specific method. This probably could be improved by splitting and waiting for the device response on the lower level (for Android and iOS) instead of using PRs are welcomed! |
I update my project to using new version 0.25. When scan device, it fail. Error starting scan. |
@andrey-ushakov . I created pull request for you. Let check it! |
Did you get a chance to check the printing issue btw? I've tested it on my cheap small Bluetooth printers and it works. However, the sleeping time (in ms) could be different for different printers. That's a "quick and dirty" solution and it must be improved in future releases. |
@andrey-ushakov . |
I have made all adjustment in queueSleepTimeMs & chunkSizeBytes for printing jpg, but still I getting the image as breaking parts in printout. Printer model: Model MHT-P5801 How I can resolve this issue?, Please help. |
@hamzamon try increasing the chunkSizeBytes if its too slow, I had to set chunkSizeBytes to 200 and queueSleepTimeMs to 10 for smoother printing of images. |
I try with Niimbot B3S doesn't work anymore |
facing version mismatching when I use esc_pos_printer&esc_pos_bluetooth at the same time.. |
Performance while printing text, QRcode, and others were good but the image was poor. Have you any solutions? |
How can we print pdf files without conversion to images? |
Hi, Can your share the link of printers? Thanks! |
I have tested on iOS with this printer. All functions worked well.
https://www.craftdata.co.uk/thermal-printers/fk-pc301-d-3-mobile-thermal-printer-with-autocutter
But it has some problems need to be improved.
1/ writeData method with big data, this device auto disconnect.
2/ Printing not smooth. Maybe you should support split byte data to more packets.
The text was updated successfully, but these errors were encountered: