From e7f4e0e9c0d0c3dc0f5116b789625fea077926f4 Mon Sep 17 00:00:00 2001 From: msweet Date: Wed, 16 Dec 2015 18:35:12 +0000 Subject: [PATCH] The EPL2 and ZPL sample drivers did not properly support the CutMedia option. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@13021 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-2.1.txt | 2 ++ filter/rastertolabel.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CHANGES-2.1.txt b/CHANGES-2.1.txt index 16fe4fdd50..6a0107e378 100644 --- a/CHANGES-2.1.txt +++ b/CHANGES-2.1.txt @@ -5,6 +5,8 @@ CHANGES IN CUPS V2.1.3 - The scheduler should not exit under memory pressure () + - The EPL2 and ZPL sample drivers did not properly support the CutMedia + option. CHANGES IN CUPS V2.1.2 diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c index fe38f93407..7edef8f649 100644 --- a/filter/rastertolabel.c +++ b/filter/rastertolabel.c @@ -471,6 +471,13 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */ */ puts("P1"); + + /* + * Cut the label as needed... + */ + + if (header->CutMedia) + puts("C"); break; case ZEBRA_ZPL : @@ -602,6 +609,13 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */ puts("^IDR:CUPS.GRF^FS"); puts("^XZ"); + + /* + * Cut the label as needed... + */ + + if (header->CutMedia) + puts("^CN1"); break; case ZEBRA_CPCL : -- 2.47.2