From ff248a9b68d65214f107727e229be9d00355acb3 Mon Sep 17 00:00:00 2001 From: Joe Lothan Date: Mon, 15 Jun 2026 18:25:26 -0400 Subject: [PATCH] fix spacing and cut line --- print_tape.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/print_tape.py b/print_tape.py index 404fbe3..c8ab96d 100644 --- a/print_tape.py +++ b/print_tape.py @@ -14,8 +14,9 @@ import sys from escpos.printer import Dummy -# TM-T88V: 42 columns at Font A on 80mm paper -LINE_WIDTH = 42 +# TM-T88V with 90° rotation: Font A chars are 24 dots wide (instead of 12), +# so 512 printable dots / 24 = 21 chars fit across the 80mm paper width. +LINE_WIDTH = 21 def print_trade(p, symbol, lots, price): @@ -57,6 +58,8 @@ def main(): price = float(price_str) print_trade(p, symbol, lots, price) + # Feed past the cutter (~20mm above print head, ~12 lines at 12-dot spacing) + p.text("\n" * 16) p.cut() with open(output_file, "wb") as f: