Receipt
A shop receipt on an 80 mm roll that grows with its items.
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
}
]
}
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:
| Column | Binds to | Width |
|---|---|---|
| Item | name | 56% |
| Qty | quantity | 14% |
| Total | amount | 30% |
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-headerreport-footer
Properties that matter
Only properties this template changed from their defaults — anything omitted is left as-is.
| Band | Element | Property | Value |
|---|---|---|---|
report-header | text | role | heading |
report-header | text | text | {{storeName}} |
report-header | text | fontSize | 15 |
report-header | text | fontWeight | 700 |
report-header | text | align | center |
report-header | text | lineHeight | 1.3 |
report-header | text | text | {{storeAddress}} |
report-header | text | fontSize | 8 |
report-header | text | fontWeight | 400 |
report-header | text | color | #525252 |
report-header | text | align | center |
report-header | text | lineHeight | 1.3 |
report-header | rect | fill | #a3a3a3 |
report-header | rect | radius | 0 |
report-header | text | text | Receipt {{receiptNumber}} |
report-header | text | fontSize | 8 |
report-header | text | fontWeight | 400 |
report-header | text | lineHeight | 1.3 |
report-header | text | text | {{date | datetime:"short"}} |
report-header | text | fontSize | 8 |
report-header | text | fontWeight | 400 |
report-header | text | align | right |
report-header | text | lineHeight | 1.3 |
report-header | text | text | Cashier: {{cashier}} |
report-header | text | fontSize | 8 |
report-header | text | fontWeight | 400 |
report-header | text | lineHeight | 1.3 |
report-header | rect | fill | #a3a3a3 |
report-header | rect | radius | 0 |
report-footer | rect | fill | #a3a3a3 |
report-footer | rect | radius | 0 |
report-footer | text | text | Subtotal |
report-footer | text | fontSize | 9 |
report-footer | text | fontWeight | 400 |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | {{subtotal | number:"#,##0.00"}} |
report-footer | text | fontSize | 9 |
report-footer | text | fontWeight | 400 |
report-footer | text | align | right |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | Tax |
report-footer | text | fontSize | 9 |
report-footer | text | fontWeight | 400 |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | {{tax | number:"#,##0.00"}} |
report-footer | text | fontSize | 9 |
report-footer | text | fontWeight | 400 |
report-footer | text | align | right |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | TOTAL {{currency}} |
report-footer | text | fontSize | 12 |
report-footer | text | fontWeight | 700 |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | {{total | number:"#,##0.00"}} |
report-footer | text | fontSize | 12 |
report-footer | text | fontWeight | 700 |
report-footer | text | align | right |
report-footer | text | lineHeight | 1.3 |
report-footer | text | text | Paid by {{paymentMethod}} |
report-footer | text | fontSize | 8 |
report-footer | text | fontWeight | 400 |
report-footer | text | color | #525252 |
report-footer | text | lineHeight | 1.3 |
report-footer | rect | fill | #a3a3a3 |
report-footer | rect | radius | 0 |
report-footer | text | text | Thank you! Please come again. |
report-footer | text | fontSize | 9 |
report-footer | text | fontWeight | 400 |
report-footer | text | align | center |
report-footer | text | lineHeight | 1.3 |
report-footer | barcode | value | {{receiptNumber}} |