Skip to content

feat: render raster logos, add paper width, fix serial reception - #1

Open
STT196 wants to merge 1 commit into
x1n-Q:mainfrom
STT196:main
Open

feat: render raster logos, add paper width, fix serial reception#1
STT196 wants to merge 1 commit into
x1n-Q:mainfrom
STT196:main

Conversation

@STT196

@STT196 STT196 commented Aug 30, 2026

Copy link
Copy Markdown

Summary

Adds full ESC/POS raster-image (logo) support to the receipt printer emulator, plus a paper-width setting and a serial-reception bugfix.

Changes

  • GS v 0 bit-image parsing: decodes the raster and renders the logo inline in the receipt preview as a real bitmap, proportional to the paper width.
  • Paper width: new 58mm/80mm selector (saved per profile) that adjusts text columns and image scale.
  • Serial fix: the serial listener used the default 4096-byte SerialPort buffer, dropping data on receipts larger than 4KB (images). Switched to a 256KB buffer and a continuous read loop.
  • Command handling: added ESC d (feed) and GS V m n (cut) so they no longer emit "Unhandled byte" warnings.
  • Log UX: added copy-to-clipboard buttons for the raw and parsed log panels.

Testing

  • Verified against a POS emitting GS v 0 (384-wide logos) over both TCP and serial.
  • dotnet build passes with 0 errors.

- Parse GS v 0 bit-image commands and render the logo inline in the receipt preview (proportional to paper width)
- Add 58mm/80mm paper-width selection affecting text columns and image scale
- Fix serial listener dropping data on large receipts (read-buffer overflow -> 256KB buffer + read loop)
- Handle ESC d (feed) and GS V m n (cut) to remove spurious warnings
- Add copy-to-clipboard buttons for raw and parsed logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant