/*
- * "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $"
+ * "$Id: rastertolabel.c 6820 2007-08-20 21:15:28Z mike $"
*
* Label printer filter for the Common UNIX Printing System (CUPS).
*
+ * Copyright 2007 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
- * property of Easy Software Products and are protected by Federal
- * copyright law. Distribution and use rights are outlined in the file
- * "LICENSE.txt" which should have been included with this file. If this
- * file is missing or damaged please contact Easy Software Products
- * at:
- *
- * Attn: CUPS Licensing Information
- * Easy Software Products
- * 44141 Airport View Drive, Suite 204
- * Hollywood, Maryland 20636 USA
- *
- * Voice: (301) 373-9600
- * EMail: cups-info@cups.org
- * WWW: http://www.cups.org
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*
#include <cups/cups.h>
#include <cups/string.h>
+#include <cups/i18n.h>
#include "raster.h"
#include <stdlib.h>
#include <unistd.h>
* Set label size...
*/
- printf("q%d\n", header->cupsWidth);
+ printf("q%d\n", (header->cupsWidth + 7) & ~7);
break;
case ZEBRA_ZPL :
* End the label and eject...
*/
- puts("^XZ");
+ puts("^IDR:CUPS.GRF^FS");
+ puts("^XZ");
/*
* Free compression buffers...
* Set the length of the data and write it...
*/
- printf("\033*b%dW", comp_ptr - CompBuffer);
+ printf("\033*b%dW", (int)(comp_ptr - CompBuffer));
fwrite(CompBuffer, comp_ptr - CompBuffer, 1, stdout);
/*
* and return.
*/
- fputs("ERROR: rastertolabel job-id user title copies options [file]\n", stderr);
+ fprintf(stderr, _("Usage: %s job-id user title copies options [file]\n"),
+ argv[0]);
return (1);
}
*/
if ((y & 15) == 0)
- fprintf(stderr, "INFO: Printing page %d, %d%% complete...\n", Page,
+ fprintf(stderr, _("INFO: Printing page %d, %d%% complete...\n"), Page,
100 * y / header.cupsHeight);
/*
*/
if (Page == 0)
- fputs("ERROR: No pages found!\n", stderr);
+ fputs(_("ERROR: No pages found!\n"), stderr);
else
- fputs("INFO: Ready to print.\n", stderr);
+ fputs(_("INFO: Ready to print.\n"), stderr);
return (Page == 0);
}
/*
- * End of "$Id: rastertolabel.c 6235 2007-02-05 21:03:49Z mike $".
+ * End of "$Id: rastertolabel.c 6820 2007-08-20 21:15:28Z mike $".
*/