ESC/POS emulator: preview and debug receipts without a printer
Disclosure: I work on ESCPost and Receiptful, both mentioned below. ESCPost is Apache-2.0 and needs no account, so you can check every claim here yourself. If you have ever wired up a thermal printer, you know the loop: Move a column. Print. Squint at 58mm of paper. The total is off, or the euro sign came out as ? . Go back to 1. Every round costs paper, a walk to the printer, and about ninety seconds. And when it comes out wrong, you still do not know why. You never see the bytes. Two things fixed this for me. Both run on your machine, and neither needs a printer plugged in. They are part of ESCPost , our open-source Rust CLI. Apache-2.0, no account, works offline. Draw the bytes on screen ESC/POS is just bytes. If you know the printer's geometry, you can draw them on screen instead of on paper. escpost render receipt.hex --profile REFERENCE --output-dir renderings Logo, header, item columns, a double-height total, then a voucher with a QR code. It is drawn at the printer's own dot resolution, so the spacing you see is the spacing you get. Two files came out because the job has a cut in it. You get one PNG per sheet plus a manifest listing them. It reads stdin too: generate-receipt | escpost render - --profile REFERENCE > receipt.png Now your receipt code has a visual test. Three seconds a round instead of ninety. And since the render is deterministic, you can commit those PNGs and diff them in CI. That catches the refactor that shifted your tax column, before it reaches two hundred shops. Become the printer Most of the time the interesting bytes come from software you did not write. An ERP, a POS suite, some legacy Windows thing. You cannot see what it sends. Nearly all of them print over RAW TCP on port 9100. So pretend to be the printer: escpost serve --listen 127.0.0.1:9100 --web-listen 127.0.0.1:9000 --profile REFERENCE Point the application at that address and hit print. Nothing reaches paper. The job opens in your browser instead. Sheets on one side, the dec