From 9bc3b30a6097326cdac6fbcb6d5c4c9430c75847 Mon Sep 17 00:00:00 2001 From: Romain Porte Date: Tue, 18 Jul 2017 18:50:38 +0200 Subject: [PATCH] Optional feed for cut (closes #213) --- src/escpos/escpos.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index ec4df3b..64e8e05 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -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,9 +584,11 @@ 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') """ - self.print_and_feed(6) + if feed: + self.print_and_feed(6) mode = mode.upper() if mode not in ('FULL', 'PART'):