359 Receipt Printing

Receipt Printing

Point-of-sale receipts for 80 mm and 58 mm thermal printers: monospaced layout, dashed rules, VAT, change, QR code and barcode. Print the HTML version from the browser or the PDF (exact roll width) on the server.

Receipts

RC-2026-00006
Green Valley International School
46,421.95
RC-2026-00005
Northstar Logistics Co., Ltd.
36,760.92
RC-2026-00004
Lanna Craft Studio
25,487.40
RC-2026-00003
Bangkok Smile Dental Clinic
78,414.95
RC-2026-00002
Chiang Mai Coffee House
17,580.10
RC-2026-00001
Siam Fresh Market Co., Ltd.
14,113.30

Record a payment

HTML receipt

Northwind Print Co., Ltd.
88 Rama VI Road, Ratchathewi, Bangkok 10400
TAX ID 0105559999999
RECEIPT / TAX INVOICE (ABB)
No.RC-2026-00006
Date14 Sep 2026 11:36
CashierCounter 2 - Beam
InvoiceINV-202609-003
Ink Cartridge Black 6807,590.00
11 x 690.00
Packing Tape 48 mm225.00
5 x 45.00
Heavy Duty Stapler4,130.00
7 x 590.00
Thermal Receipt Printer 80 mm29,940.00
6 x 4,990.00
Binder Clips Assorted (box)600.00
5 x 120.00
Poster A2 Full Colour900.00
2 x 450.00
Subtotal43,385.00
VAT 7% (incl.)3,036.95
TOTAL46,421.95
PROMPTPAY46,421.95
Change0.00
QR barcode
Thank you for your purchase!

PDF (80 mm roll)

How it works
  • PDF: the page is new Rectangle(80 mm, estimated height) - a roll has no fixed length, so the height is calculated from the number of lines. Courier (fixed width) keeps the columns straight.
  • HTML: CSS @page { size: 80mm auto; margin: 0 } and a 302 px wide box (80 mm at 96 dpi).
  • Paying an invoice inserts a receipt row and sets invoice.status = 'PAID' in one @Transactional method (BusinessService.pay).
  • Real POS printers often take raw ESC/POS commands instead of PDF - the PDF/HTML approach works with any Windows printer driver.

Files: service/ReceiptPdfService.java, templates/receipts.html.