Skip to main content

Receipt

A shop receipt on an 80 mm roll that grows with its items.

Open it and take it apart

Everything below is generated from the template itself, so it always matches what you get. Start from this template to open an editable copy.

What it teaches​

  • Receipt-roll paper: one page as tall as the content
  • Binding a table to an array field
  • Number formats for money
  • A barcode made from a field

The data you send​

Pass this as your render payload. The field names come from the template's schema — rename them there and the tokens follow.

{
"storeName": "Corner Café",
"storeAddress": "12 Market Street, Springfield",
"receiptNumber": "R-000482",
"date": "2026-10-02T09:41",
"cashier": "Sam",
"currency": "USD",
"subtotal": 13.5,
"tax": 1.08,
"total": 14.58,
"paymentMethod": "Card",
"items": [
{
"name": "Espresso",
"quantity": 2,
"amount": 5
},
{
"name": "Espresso",
"quantity": 2,
"amount": 5
}
]
}
About the sample rows

The schema stores one sample value per field, so every generated row looks the same. Trimmed to 2 here; your real array can be any length.

How the array reaches the page​

The table's bindingField is items, so its body row repeats once per item in that array. Each cell binds to one property of the item:

ColumnBinds toWidth
Itemname56%
Qtyquantity14%
Totalamount30%

A token inside a body cell resolves against that row's item, not the document. That is the single thing people get wrong most often.

Band stack​

A Paperwright document is a stack of bands. This template uses:

  • report-header
  • report-footer

Properties that matter​

Only properties this template changed from their defaults — anything omitted is left as-is.

BandElementPropertyValue
report-headertextroleheading
report-headertexttext{{storeName}}
report-headertextfontSize15
report-headertextfontWeight700
report-headertextaligncenter
report-headertextlineHeight1.3
report-headertexttext{{storeAddress}}
report-headertextfontSize8
report-headertextfontWeight400
report-headertextcolor#525252
report-headertextaligncenter
report-headertextlineHeight1.3
report-headerrectfill#a3a3a3
report-headerrectradius0
report-headertexttextReceipt {{receiptNumber}}
report-headertextfontSize8
report-headertextfontWeight400
report-headertextlineHeight1.3
report-headertexttext{{date | datetime:"short"}}
report-headertextfontSize8
report-headertextfontWeight400
report-headertextalignright
report-headertextlineHeight1.3
report-headertexttextCashier: {{cashier}}
report-headertextfontSize8
report-headertextfontWeight400
report-headertextlineHeight1.3
report-headerrectfill#a3a3a3
report-headerrectradius0
report-footerrectfill#a3a3a3
report-footerrectradius0
report-footertexttextSubtotal
report-footertextfontSize9
report-footertextfontWeight400
report-footertextlineHeight1.3
report-footertexttext{{subtotal | number:"#,##0.00"}}
report-footertextfontSize9
report-footertextfontWeight400
report-footertextalignright
report-footertextlineHeight1.3
report-footertexttextTax
report-footertextfontSize9
report-footertextfontWeight400
report-footertextlineHeight1.3
report-footertexttext{{tax | number:"#,##0.00"}}
report-footertextfontSize9
report-footertextfontWeight400
report-footertextalignright
report-footertextlineHeight1.3
report-footertexttextTOTAL {{currency}}
report-footertextfontSize12
report-footertextfontWeight700
report-footertextlineHeight1.3
report-footertexttext{{total | number:"#,##0.00"}}
report-footertextfontSize12
report-footertextfontWeight700
report-footertextalignright
report-footertextlineHeight1.3
report-footertexttextPaid by {{paymentMethod}}
report-footertextfontSize8
report-footertextfontWeight400
report-footertextcolor#525252
report-footertextlineHeight1.3
report-footerrectfill#a3a3a3
report-footerrectradius0
report-footertexttextThank you! Please come again.
report-footertextfontSize9
report-footertextfontWeight400
report-footertextaligncenter
report-footertextlineHeight1.3
report-footerbarcodevalue{{receiptNumber}}

Start from this template →