|
|
|
@ -96,7 +96,7 @@ class LogPrinter(logging.Handler):
|
|
|
|
|
#text = textwrap.fill(msg, width=self.printer["textwidth"])
|
|
|
|
|
spliter_regex = r'.{1,' + self.printer["textwidth"] + '}(?:\s+|$)'
|
|
|
|
|
out_text = "\r\n".join(line.strip() for line in
|
|
|
|
|
re.findall(spliter_regex, text)))
|
|
|
|
|
re.findall(spliter_regex, text))
|
|
|
|
|
out_text += "\r\n" * 4
|
|
|
|
|
prn.text(out_text)
|
|
|
|
|
prn.cut()
|
|
|
|
@ -447,7 +447,8 @@ class Bureau(object):
|
|
|
|
|
prn = self._get_small_printer()
|
|
|
|
|
|
|
|
|
|
spliter_regex = r'.{1,' + self.printer["textwidth"] + '}(?:\s+|$)'
|
|
|
|
|
out_text = "\r\n".join(line.strip() for line in re.findall(splitter_regex, text)))
|
|
|
|
|
out_text = "\r\n".join(line.strip() for line in
|
|
|
|
|
re.findall(splitter_regex, text))
|
|
|
|
|
|
|
|
|
|
prn.text(out_text + "\r\n")
|
|
|
|
|
if linefeed:
|
|
|
|
|