/*
- * "$Id: imagetops.c 6420 2007-03-30 20:00:59Z mike $"
+ * "$Id: imagetops.c 6649 2007-07-11 21:46:42Z mike $"
*
* Image file to PostScript filter for the Common UNIX Printing System (CUPS).
*
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1993-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.
*
if ((val = cupsGetOption("scaling", num_options, options)) != NULL)
zoom = atoi(val) * 0.01;
- else if (cupsGetOption("fitplot", num_options, options))
+ else if ((val = cupsGetOption("fitplot", num_options, options)) != NULL &&
+ !strcasecmp(val, "true"))
+ zoom = 1.0;
+ else if ((val = cupsGetOption("fit-to-page", num_options, options)) != NULL &&
+ !strcasecmp(val, "true"))
zoom = 1.0;
if ((val = cupsGetOption("ppi", num_options, options)) != NULL)
if ((val = cupsGetOption("hue", num_options, options)) != NULL)
hue = atoi(val);
- if ((val = cupsGetOption("mirror", num_options, options)) != NULL &&
- strcasecmp(val, "True") == 0)
+ if ((choice = ppdFindMarkedChoice(ppd, "MirrorPrint")) != NULL)
+ {
+ val = choice->choice;
+ choice->marked = 0;
+ }
+ else
+ val = cupsGetOption("mirror", num_options, options);
+
+ if (val && (!strcasecmp(val, "true") || !strcasecmp(val, "on") ||
+ !strcasecmp(val, "yes")))
Flip = 1;
if ((val = cupsGetOption("emit-jcl", num_options, options)) != NULL &&
if (img == NULL)
{
- fputs(_("ERROR: Unable to open image file for printing!\n"), stderr);
+ fputs(_("ERROR: Unable to open image file for printing\n"), stderr);
ppdClose(ppd);
return (1);
}
/*
- * End of "$Id: imagetops.c 6420 2007-03-30 20:00:59Z mike $".
+ * End of "$Id: imagetops.c 6649 2007-07-11 21:46:42Z mike $".
*/