]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Handle Apple raster.
authorMichael Sweet <michael.r.sweet@gmail.com>
Wed, 9 Nov 2016 02:31:50 +0000 (21:31 -0500)
committerMichael Sweet <michael.r.sweet@gmail.com>
Wed, 9 Nov 2016 02:31:50 +0000 (21:31 -0500)
conf/mime.convs.in
conf/mime.types
filter/rastertopwg.c

index f460000dd1027166d07ab2b9f0354ac1993f157a..bffd04f8417d023ae31a1dba01d867034d32f304 100644 (file)
@@ -1,20 +1,18 @@
 #
-# "$Id$"
+# DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
+# VERSIONS OF CUPS.  Instead, create a "local.convs" file that
+# reflects your local configuration changes.
 #
-#   DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
-#   VERSIONS OF CUPS.  Instead, create a "local.convs" file that
-#   reflects your local configuration changes.
+# Base MIME conversions file for CUPS.
 #
-#   Base MIME conversions file for CUPS.
+# Copyright 2007-2016 by Apple Inc.
+# Copyright 1997-2007 by Easy Software Products.
 #
-#   Copyright 2007-2011 by Apple Inc.
-#   Copyright 1997-2007 by Easy Software Products.
-#
-#   These coded instructions, statements, and computer programs are the
-#   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/".
+# These coded instructions, statements, and computer programs are the
+# 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/".
 #
 
 ########################################################################
@@ -47,6 +45,7 @@ application/postscript                application/vnd.cups-postscript 66      pstops
 
 # PWG Raster filter for IPP Everywhere...
 application/vnd.cups-raster    image/pwg-raster                100     rastertopwg
+application/vnd.cups-raster    image/urf                       100     rastertopwg
 
 ########################################################################
 #
@@ -57,7 +56,3 @@ application/vnd.cups-raster   image/pwg-raster                100     rastertopwg
 #
 
 @DEFAULT_RAW_PRINTING@application/octet-stream application/vnd.cups-raw        0       -
-
-#
-# End of "$Id$".
-#
index dcb07710ef40df6f444637ee9b07d27f841f1e85..1c50f16a661ff9858541ab4c2c61cea6cba34760 100644 (file)
@@ -1,13 +1,11 @@
 #
-# "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $"
-#
 # Base MIME types file for CUPS.
 #
 # DO NOT EDIT THIS FILE, AS IT IS OVERWRITTEN WHEN YOU INSTALL NEW
 # VERSIONS OF CUPS.  Instead, create a "local.types" file that
 # reflects your local configuration changes.
 #
-# Copyright 2007-2015 by Apple Inc.
+# Copyright 2007-2016 by Apple Inc.
 # Copyright 1997-2007 by Easy Software Products.
 #
 # These coded instructions, statements, and computer programs are the
@@ -114,6 +112,7 @@ image/x-xpixmap                     xpm ascii(0,1024) + string(3,"XPM")
 image/x-sun-raster             ras string(0,<59a66a95>)
 
 #image/fpx                     fpx
+image/urf                      urf string(0,UNIRAST<00>)
 image/x-alias                  pix short(8,8) short(8,24)
 image/x-bitmap                 bmp string(0,BM) + !printable(2,14)
 image/x-icon                   ico
@@ -176,7 +175,3 @@ application/vnd.cups-raw    (string(0,<1B>E) + !string(2,<1B>%0B)) \
 #
 
 application/octet-stream
-
-#
-# End of "$Id: mime.types 7670 2008-06-17 22:42:08Z mike $".
-#
index 66c1512c72d21373ddfadb437d0f6589e4a9f5df..a25d59599c55b77d5cbc931f86b5f595c219e010 100644 (file)
@@ -31,6 +31,8 @@ int                                   /* O - Exit status */
 main(int  argc,                                /* I - Number of command-line args */
      char *argv[])                     /* I - Command-line arguments */
 {
+  const char           *final_content_type;
+                                       /* FINAL_CONTENT_TYPE env var */
   int                  fd;             /* Raster file */
   cups_raster_t                *inras,         /* Input raster stream */
                        *outras;        /* Output raster stream */
@@ -73,8 +75,11 @@ main(int  argc,                              /* I - Number of command-line args */
   else
     fd = 0;
 
+  if ((final_content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
+    final_content_type = "image/pwg-raster";
+
   inras  = cupsRasterOpen(fd, CUPS_RASTER_READ);
-  outras = cupsRasterOpen(1, CUPS_RASTER_WRITE_PWG);
+  outras = cupsRasterOpen(1, !strcmp(final_content_type, "image/pwg-raster") ? CUPS_RASTER_WRITE_PWG : CUPS_RASTER_WRITE_APPLE);
 
   ppd   = ppdOpenFile(getenv("PPD"));
   back  = ppdFindAttr(ppd, "cupsBackSide", NULL);