-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Description
I've implemented simple printing queue which starts printing when printer's onReady
is observed.
Unfortunately, when invoking printAsync
it's throwing StarIO10UnprintableException
.
So looks like the onReady
is called when the printer is not ready yet (for example after closing the printer's cover the onReady
is emitted, but the printer is still making some sounds - I assume it's still getting ready to print).
What I've discovered is that if I add a little delay after the onReady
has been observed, then the printing works totally fine.
This is my pseudocode:
printer.printerDelegate = object : PrinterDelegate() {
override fun onReady() {
super.onReady()
delay(2.seconds)
printer.printAsync(commands).await()
}
Your device where the bug occurs
Lenovo Tab M10 FHD Plus
Your printer
Star SP700 (SP742)
- Interface:
Ethernet or Wi-Fi
Your development environment
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
StarXpand SDK version is 1.8.0
.
To Reproduce
Steps to reproduce the behavior:
- Set up
PrinterDelegate
to monitor printer's statuses. - Invoke
onReady
(turn on the printer / close printer's cover / insert paper) - when
onReady
is called, invokeprintAsync
.
Expected behavior
When onReady
is observed I'd expect the printer would be ready to receive print requests.