Optional feed for cut (closes #213)

This commit is contained in:
Romain Porte 2017-07-18 18:50:38 +02:00 committed by Patrick Kanzler
parent 5bd6dcf471
commit 9bc3b30a60
1 changed files with 4 additions and 2 deletions

View File

@ -574,7 +574,7 @@ class Escpos(object):
self._raw(LINESPACING_FUNCS[divisor] + six.int2byte(spacing))
def cut(self, mode='FULL'):
def cut(self, mode='FULL', feed=True):
""" Cut paper.
Without any arguments the paper will be cut completely. With 'mode=PART' a partial cut will
@ -584,8 +584,10 @@ class Escpos(object):
.. todo:: Check this function on TM-T88II.
: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')
"""
if feed:
self.print_and_feed(6)
mode = mode.upper()