Optional feed for cut (closes #213)
This commit is contained in:
parent
5bd6dcf471
commit
9bc3b30a60
|
@ -574,7 +574,7 @@ class Escpos(object):
|
||||||
|
|
||||||
self._raw(LINESPACING_FUNCS[divisor] + six.int2byte(spacing))
|
self._raw(LINESPACING_FUNCS[divisor] + six.int2byte(spacing))
|
||||||
|
|
||||||
def cut(self, mode='FULL'):
|
def cut(self, mode='FULL', feed=True):
|
||||||
""" Cut paper.
|
""" Cut paper.
|
||||||
|
|
||||||
Without any arguments the paper will be cut completely. With 'mode=PART' a partial cut will
|
Without any arguments the paper will be cut completely. With 'mode=PART' a partial cut will
|
||||||
|
@ -584,9 +584,11 @@ class Escpos(object):
|
||||||
.. todo:: Check this function on TM-T88II.
|
.. todo:: Check this function on TM-T88II.
|
||||||
|
|
||||||
:param mode: set to 'PART' for a partial cut. default: 'FULL'
|
:param mode: set to 'PART' for a partial cut. default: 'FULL'
|
||||||
|
:param feed: print and feed before cutting. default: true
|
||||||
:raises ValueError: if mode not in ('FULL', 'PART')
|
:raises ValueError: if mode not in ('FULL', 'PART')
|
||||||
"""
|
"""
|
||||||
self.print_and_feed(6)
|
if feed:
|
||||||
|
self.print_and_feed(6)
|
||||||
|
|
||||||
mode = mode.upper()
|
mode = mode.upper()
|
||||||
if mode not in ('FULL', 'PART'):
|
if mode not in ('FULL', 'PART'):
|
||||||
|
|
Loading…
Reference in New Issue