question

Will Macaluso avatar image
Will Macaluso asked clover-dev commented

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

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 clover-dev commented

Try this out:

PrintJob pj = new StaticOrderPrintJob.Builder().markPrinted(true).order(order).build();
pj.print(context, CloverAccount.getAccount(context));
2 comments
10 |2000

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 commented ·

Thanks - Looks pretty straightforward :)

0 Likes 0 ·
clover-dev avatar image clover-dev commented ·

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