Task 10 of 16 — these are sequential, do them in order.
Previous: #12 · Next: #14
Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.
Goal
Port the ESC/POS parser and the PDF ticket renderer. Tasks 12 and 13 both save tickets through it.
Scope
- Parse the ESC/POS stream a VKP80III receives: text + codepage, alignment, font size/emphasis, line feeds, barcodes, QR codes, raster/bit-image blocks, cut.
- Render the parsed ticket to a PDF page sized like the 80 mm roll and write it to the ticket dir with a timestamped filename.
- Public API:
printer::render_ticket(bytes: &[u8], ticket_dir: &Path) -> Result<PathBuf>.
- Crates:
printpdf (PDF) + image (raster blocks).
Reference
cloudpark-toolkit/internal/tcp105/printer/escpos.go (775 lines), printer.go, printer_test.go
Done when
Task 10 of 16 — these are sequential, do them in order.
Previous: #12 · Next: #14
Goal
Port the ESC/POS parser and the PDF ticket renderer. Tasks 12 and 13 both save tickets through it.
Scope
printer::render_ticket(bytes: &[u8], ticket_dir: &Path) -> Result<PathBuf>.printpdf(PDF) +image(raster blocks).Reference
cloudpark-toolkit/internal/tcp105/printer/escpos.go(775 lines),printer.go,printer_test.goDone when