Curetix/label-printer

Print text labels on a Supvan E10 label printer straight from the browser (Web Bluetooth). No vendor app, no account.

★ 1Forks 0TypeScriptGitHub ↗Compare

README

Label Printer

A tiny web app for printing text labels on a Supvan E10 (and probably its E11/E16 and Katasymbol siblings) over Bluetooth, straight from the browser. No vendor app, no account, no cloud, nothing to install.

Works in Chrome or Edge on Android, Windows, macOS and Linux (Web Bluetooth). Safari/iOS and Firefox are not supported. Brave works after enabling brave://flags/#brave-web-bluetooth-api; the app points there when Brave blocks it.

Using it

  1. Switch the printer on.
  2. Open the page, type your text, press Connect and print, and pick the printer from the browser's Bluetooth list. It usually shows up under its serial number (e.g. T0131F…) rather than "E10".
  3. After that, the page stays connected until you close it.

On Android, "Add to home screen" installs it like an app. It also opens offline once it has been loaded once.

First-time calibration

The E10's print path was ported from a driver that was tested on its bigger siblings, so the first print may come out rotated, mirrored or shifted. Open Printer settings → Print test pattern: it prints an outline of the whole printhead, a tick ruler along one edge and a large "F".

  • "F" upside down → turn on Rotate 180°
  • "F" reads backwards → turn on Mirror (plus Rotate if needed)
  • Outline cut off on one side → adjust Shift across
  • Faint or smeared → adjust Darkness

Settings are saved in the browser.

If it doesn't connect or print

  • Printer not in the list: use Pick from all Bluetooth devices.
  • "Does not offer any of the known Supvan Bluetooth services": the printer may only speak classic Bluetooth. Pair it in the OS settings, then use Connect via serial port (desktop Chrome/Edge).
  • Connects but stalls when printing: set Bluetooth packet size to 20 bytes, reconnect, retry.
  • Every command and response is written to the Log section, so copy it when asking for help.

Development

pnpm install
pnpm dev        # http://localhost:5173 (Web Bluetooth works on localhost)
pnpm test       # protocol unit tests + a simulated print job
pnpm build      # static site in dist/

Pushing to main deploys to GitHub Pages via .github/workflows/deploy.yml (enable Pages with source "GitHub Actions" in the repo settings). Web Bluetooth needs HTTPS, which Pages provides.

Layout

Path What
src/printer/protocol.ts Frames, print-buffer layout, LZMA packing, status parsing
src/printer/printer.ts Request/response handling and the print sequence
src/printer/links.ts Web Bluetooth (BLE) and Web Serial (classic SPP) transports
src/printer/render.ts Text → 1-bit bitmap → printer raster
src/App.tsx The UI (Astryx components)

Credits

  • The printer protocol comes from heeen/supvan-cups (MIT), a reverse-engineered Linux driver for Supvan printers.
  • LZMA compression: LZMA-JS (MIT), vendored in src/printer/vendor/ with a small patch for the printer's 8 KiB dictionary.

Contributors

Curetix

Issues