Add flush function
* Flushing the file will cause the driver to flush the cache and print * the whole buffer.
This commit is contained in:
parent
1a1ed5e7fc
commit
8fd05eb02b
|
@ -176,6 +176,10 @@ class File(Escpos):
|
|||
if self.device is None:
|
||||
print("Could not open the specified file %s" % self.devfile)
|
||||
|
||||
def flush(self):
|
||||
"""Flush printing content"""
|
||||
self.device.flush()
|
||||
|
||||
|
||||
def _raw(self, msg):
|
||||
""" Print any command sent in raw format """
|
||||
|
|
Loading…
Reference in New Issue