Printer
SDK & Device APIs / Printer
Owner: SDK team · Reviewed 12 Oct 2026
Printer
Print receipts, text and QR codes on the terminal’s built-in printer. Follow the steps in order: each one explains a single call and shows only the few lines you need.
1 Initialise the printer
Get the printer service and check that it is ready before sending anything to print.
Only the call explained in this step
Printer printer = NewlandSdk.getPrinter(context);
printer.init();
2 Print text and a QR code
Add the lines of text and the QR code to the print job, then send it. Text alignment and size are set per line.
Only the call explained in this step
printer.addText("Thank you!", Align.CENTER);
printer.addQrCode(receiptUrl, 240);
printer.print();
3 Cut the paper and release
Feed and cut the paper when the job is finished, and release the printer so other apps can use it.
Only the call explained in this step
printer.feedAndCut();
printer.release();
4 Handle errors (paper out, overheating)
Listen for printer status errors and show a clear message to the operator. The most common are paper out and overheating.
Only the call explained in this step
printer.setOnErrorListener(error -> {
if (error == PrinterError.PAPER_OUT) showPaperOutMessage();
});
Toolkit — stays in view while you scroll
Install
implementation "pt.newnote:newland-sdk:3.4.0"
🔒 Required permissions
- Printer access
- Device information (terminal model)
Download resources
Questions about this page?
Stuck on a step? Send a question to the support team. The answer arrives by email.