question

Lee Tickett avatar image
Lee Tickett asked ·

TextPrintJob on Star / Kitchen Printer

We have managed to print to a star printer using;
PrintJob pj = new StaticOrderPrintJob.Builder().order(mOrder).build();
pj.print(mContext, AccountData.sCloverAccount, printers.get(2));

But this doesn't work;
new TextPrintJob.Builder().text("Hello world!").build().print(mContext, AccountData.sCloverAccount, printers.get(2));

Is that expected/why? Is there a different technique?
Print
2 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I would also be interested in an answer to this
0 Likes 0 · ·

Bump bump...

0 Likes 0 · ·
Jeffrey Blattman avatar image
Jeffrey Blattman answered ·
Every print job has a getPrinterCategory() field. This describes the category of printers that the print job can target. TextPrintJob returns RECEIPT (as opposed to ORDER). This means such print jobs can only target category RECEIPT printers. The SP700 is an ORDER printer.

Do you see anything in the logs? It's not good if it fails silently. Seems like the print() method could do some verification that the target printer is the right category. It does not do that now.

There's no reason why one couldn't implement something like this for the SP700, we just didn't. The SP700 is a bit of an anomaly in that it's character based not bitmap. That makes anything we do for it a special case.
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Will Macaluso avatar image
Will Macaluso answered ·
I don't know if it's useful, but you can use the Star Android android SDK to print directly to the kitchen printer (you just call getIp on the printer) https://www.starmicronics.com/support/sdkdocumentation.aspx
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community