|
|
|
@ -94,9 +94,9 @@ class LogPrinter(logging.Handler):
|
|
|
|
|
out_ep=self.printer["outep"])
|
|
|
|
|
msg = self.format(record)
|
|
|
|
|
#text = textwrap.fill(msg, width=self.printer["textwidth"])
|
|
|
|
|
spliter_regex = r'.{1,' + str(self.printer["textwidth"]) + '}(?:\s+|$)'
|
|
|
|
|
splitter_regex = r'.{1,' + str(self.printer["textwidth"]) + '}(?:\s+|$)'
|
|
|
|
|
out_text = "\r\n".join(line.strip() for line in
|
|
|
|
|
re.findall(spliter_regex, msg))
|
|
|
|
|
re.findall(splitter_regex, msg))
|
|
|
|
|
out_text += "\r\n" * 4
|
|
|
|
|
prn.text(out_text)
|
|
|
|
|
prn.cut()
|
|
|
|
@ -446,7 +446,7 @@ class Bureau(object):
|
|
|
|
|
"""
|
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
|
|
|
|
|
|
spliter_regex = r'.{1,' + str(self.smprint["textwidth"]) + '}(?:\s+|$)'
|
|
|
|
|
splitter_regex = r'.{1,' + str(self.smprint["textwidth"]) + '}(?:\s+|$)'
|
|
|
|
|
out_text = "\r\n".join(line.strip() for line in
|
|
|
|
|
re.findall(splitter_regex, text))
|
|
|
|
|
|
|
|
|
|