summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorMichael R Sweet <michaelrsweet@gmail.com>2016-11-07 10:17:58 -0500
committerMichael R Sweet <michaelrsweet@gmail.com>2016-11-07 10:17:58 -0500
commit29500e14c7c977ac56aa520be45092ef8ea766fe (patch)
treeedc9284ea8fef4d22789fa18af575c96392e3a45 /filter
parent47eb8d30ac465e6d97aaf6b2ae6769dad74cba9b (diff)
downloadcups-29500e14c7c977ac56aa520be45092ef8ea766fe.tar.gz
Fix some issues with the Zebra ZPL printer driver (Issue #4898)
- Move "delete graphic" command after "end format" command since some older printers seem to have bugs with that. - Add "print width" command so that label is properly centered. - Add "inverted orientation" command so that labels are properly oriented (leading-edge == top)
Diffstat (limited to 'filter')
-rw-r--r--filter/rastertolabel.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/filter/rastertolabel.c b/filter/rastertolabel.c
index 7483a62a8..cde27a093 100644
--- a/filter/rastertolabel.c
+++ b/filter/rastertolabel.c
@@ -438,7 +438,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
*/
void
-EndPage(ppd_file_t *ppd, /* I - PPD file */
+EndPage(ppd_file_t *ppd, /* I - PPD file */
cups_page_header2_t *header) /* I - Page header */
{
int val; /* Option value */
@@ -496,6 +496,19 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
puts("^XA");
/*
+ * Rotate 180 degrees so that the top of the label/page is at the
+ * leading edge...
+ */
+
+ puts("^POI");
+
+ /*
+ * Set print width...
+ */
+
+ printf("^PW%u\n", header->cupsWidth);
+
+ /*
* Set print rate...
*/
@@ -605,8 +618,8 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
* End the label and eject...
*/
- puts("^IDR:CUPS.GRF^FS");
puts("^XZ");
+ puts("^IDR:CUPS.GRF^FS");
/*
* Cut the label as needed...