diff options
-rw-r--r-- | conf/mime.convs.in | 29 | ||||
-rw-r--r-- | conf/mime.types | 9 | ||||
-rw-r--r-- | filter/rastertopwg.c | 7 |
3 files changed, 20 insertions, 25 deletions
diff --git a/conf/mime.convs.in b/conf/mime.convs.in index f460000dd..bffd04f84 100644 --- a/conf/mime.convs.in +++ b/conf/mime.convs.in @@ -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$". -# diff --git a/conf/mime.types b/conf/mime.types index dcb07710e..1c50f16a6 100644 --- a/conf/mime.types +++ b/conf/mime.types @@ -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 $". -# diff --git a/filter/rastertopwg.c b/filter/rastertopwg.c index 66c1512c7..a25d59599 100644 --- a/filter/rastertopwg.c +++ b/filter/rastertopwg.c @@ -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); |