Loading the designer…

Sample data

The JSON the receipt is rendered with. Expressions in the template such as shop.name or receipt.number resolve against it, and a detail band repeats once per row of its dataSource, such as lines.

Render this template

The request your server sends to ERD Report Cloud for the open design and its data. Its format is the printer language the receipt's own target names, escpos, and the response body is what you write to the printer. The API key is a server secret; never call the render API from a browser.

Per-request overrides of the template's defaults; leave empty to keep them. The template's own defaults and assets are edited in the inspector: click the empty workspace outside the page.


    
  

About this demo

This page embeds the ERD Report Designer in its RECEIPT mode exactly as your application would: one script, one stylesheet, a root element with a height, and ErdReportDesigner.mountReportDesigner(). Read its source alongside README.md in the archive. Open the browser's developer tools: every event the designer raises is logged to the console as you work, and window.demo.handle() is the handle your application would hold.

The Examples menu opens three ESC/POS receipts, each with sample data, from demo/receipt-examples/: an 80 mm till receipt with a QR of the receipt number, a 58 mm parking receipt with a Code 128 of the ticket number, and an 80 mm kitchen ticket. File → Save JSON downloads exactly what the render API accepts, and Receipt → Render request shows the call your server makes with it.

This page is the receipt designer: it was mounted with composition: { targets: { paper: false, label: false, receipt: true } }, so it offers only receipt rolls and refuses a report or label template rather than opening one it could not honestly edit. reports.html and labels.html beside it are the same page mounted the other ways.