]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix some issues with the Zebra ZPL printer driver (Issue #4898)
authorMichael R Sweet <michaelrsweet@gmail.com>
Mon, 7 Nov 2016 15:17:58 +0000 (10:17 -0500)
committerMichael R Sweet <michaelrsweet@gmail.com>
Mon, 7 Nov 2016 15:17:58 +0000 (10:17 -0500)
- 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)

CHANGES.txt
filter/rastertolabel.c

index 17c291b207127354ac895eefae73728905e394c4..66b71edccca073a1425c15a3bfdc8dad816a1ce6 100644 (file)
@@ -1,8 +1,9 @@
-CHANGES.txt - 2.2.2 - 2016-10-27
+CHANGES.txt - 2.2.2 - 2016-11-07
 --------------------------------
 
 CHANGES IN CUPS V2.2.2
 
+       - Fixed some issues with the Zebra ZPL printer driver (Issue #4898)
        - Fixed some issues with IPP Everywhere printer support (Issue #4893,
          Issue #4909)
        - The cups-lpd program did not catch all legacy usage of ISO-8859-1
index 7483a62a8dd4ce6bc5d989c8057b6213127322cf..cde27a09384492abb1b12f94966f1b5e5bfa2f37 100644 (file)
@@ -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 */
@@ -495,6 +495,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...