Print a Receipt
This guide shows how to print your own content — complementary receipts, coupons, and similar — on the terminal printer with printBitmap.
How it works
You send a Bitmap to the printer and receive status updates through a callback. This is for prints your application drives, outside the SDK’s automatic sale receipts.
Before you begin
The SDK must have completed warm-up with WarmUpStatus.Success, and the terminal printer must be available.
Print a bitmap
ApoloSdk.getClient().printBitmap(bitmap) { status ->
when (status) {
GetPrinterUseCaseState.OnIdle,
GetPrinterUseCaseState.OnPrinting -> { /* printing in progress */ }
GetPrinterUseCaseState.OnSuccess -> { /* print completed */ }
is GetPrinterUseCaseState.OnError -> { /* status identifies the cause */ }
}
}Printer status
The callback reports each transition:
| State | Meaning |
|---|---|
OnIdle | Initial preparation of the print. |
OnPrinting | Print in progress. |
OnSuccess | Print completed successfully. |
OnError(status) | The print failed. status is a PosDigitalPrinterStatusEnum, such as NO_PAPER, PAPER_JAM, OVERHEAT, or LIFT_HEAD. |
Best practices
- Prepare the
Bitmapat a resolution compatible with the terminal printer. Oversized or low-contrast images degrade the result. - Wait for
OnSuccessorOnErrorbefore starting another print.
Next steps
- Transaction result reference — result codes and payload fields.
English › Documentation › Documentation › In-Store Payments › Getnet Toolbox › SDK White Label › How-to Guides