Skip to content

Repository files navigation

cataclysm

Cat printer app for Web Bluetooth — a mobile-first, installable PWA that prints to MX10-family "cat" thermal printers (GB01/GB02/GT01/YT01/MX*) straight from the browser. MIT-licensed.

Try it: cat-acylsm.pages.dev — Chrome/Edge on Android or desktop (iOS needs the Bluefy browser). Connecting requires a tap; everything else, including reconnects between prints, is automatic.

Features

  • Images — live 1:1 dithered preview with 13 algorithms (Floyd–Steinberg, Atkinson, Burkes, Sierra, Sierra Lite, Stucki, Jarvis–Judice–Ninke, Bayer 4×4/8×8, clustered-dot halftone, sketch/edges, auto-contrast, threshold), plus crop, rotate, invert, and trim-to-content
  • Text — font, size, bold, alignment, white-on-black, and a 90° mode that prints very large text along the paper length
  • PDFs — page navigation and a crop box with a 48 mm lock for true-to-scale printing (built for Deutsche Post stamp PDFs); the crop position persists for recurring documents
  • MX10 quirks, hardware-tuned — reconnect-per-job lifecycle, blank-row feeding, pre-feed that soaks up the start-of-print artifact, notification flow control with configurable packet size/delay
  • Convenience — darkness presets plus a raw energy slider, silent reconnect to the last printer on load (behind Chrome's #enable-web-bluetooth-new-permissions-backend flag), test print, update-on-tap PWA, system back button closes overlays

Everything the protocol layer does is documented in docs/mx10-cat-printer-research.md, including the reverse-engineering findings from real hardware (the malformed 0xBC frame trap, 0xBE drawing mode, feed placement, brownout behavior).

Develop

npm install
npm run dev        # dev server (Web Bluetooth needs localhost or HTTPS)
npm run check      # svelte-check + tsc
npx vitest run     # protocol, dithering, and pipeline unit tests
npm run build      # production build in dist/

The core is framework-free TypeScript — BLE protocol and transport in src/lib/printer/, raster pipeline in src/lib/image/ — with a thin Svelte 5 UI on top. Deploys as static files to any HTTPS host.

About

Cat printer app for webbluetooth, built as a PWA with cool QoL feature

Resources

Stars

Watchers

Forks

Contributors

Languages