question

Will Macaluso avatar image
Will Macaluso asked ·

Example that shows use of StaticOrderPrintJob?

II've tried using the deprecated ReceiptPrintJob, with no success. Now i'm trying to use the (now supported) StaticOrderPrintJob. However I can't find any examples of how to use it. I have the Order object (and the order id).

I just want to print the receipt for an order?

Print
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.

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered ·

Try this out:

PrintJob pj = new StaticOrderPrintJob.Builder().markPrinted(true).order(order).build();
pj.print(context, CloverAccount.getAccount(context));
2 comments 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.

Thanks - Looks pretty straightforward :)

0 Likes 0 · ·

Can you provide some example code to help me understand how to use the StaticOrderPrintJob?

Many Thanks

0 Likes 0 · ·

Welcome to the
Clover Developer Community