Skip to content

onReady called but printer is not ready to print #38

@Szczypiorek44

Description

@Szczypiorek44

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:

  1. Set up PrinterDelegate to monitor printer's statuses.
  2. Invoke onReady (turn on the printer / close printer's cover / insert paper)
  3. when onReady is called, invoke printAsync.

Expected behavior

When onReady is observed I'd expect the printer would be ready to receive print requests.

Metadata

Metadata

Labels

Status: fixedEnhancements that have been requested and implementedStatus: questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions