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: