From bd816a65993b9c837d9bd9d060159feba7f15b23 Mon Sep 17 00:00:00 2001 From: samerbam Date: Wed, 23 Aug 2023 12:56:58 -0400 Subject: [PATCH] fine tune formula --- application/thermal_print.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/thermal_print.py b/application/thermal_print.py index e8981a4..42f9549 100644 --- a/application/thermal_print.py +++ b/application/thermal_print.py @@ -83,7 +83,7 @@ class ThermalPrinter(): # self.p.text("" + " "*(32-this_line_width)) else: # self.p.text(" ") - todo_text_max_len = 32-(len(x[0])+1) + todo_text_max_len = 32-(len(x[0])) todo_text = textwrap.wrap(x[1], todo_text_max_len) # t_text = textwrap.wrap() @@ -95,7 +95,9 @@ class ThermalPrinter(): # self.p.text(" ") # self.p.text( (" "*(32-(len(x[0]))))+t+"\n" ) - self.p.text(' '*(32-len(x[0])-len(t))+t+"\n" ) + # self.p.text(' '*(32-len(x[0])-len(t))+t+"\n" ) + + self.p.text(' '*(32-len(t))+t+"\n" ) #32-len(x[0])len(text)