]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/cupsfilter.c
Merge changes from CUPS 1.5svn-r9022.
[thirdparty/cups.git] / scheduler / cupsfilter.c
index 3ece2f4b2437a41b8f40eadcb749e6dee8d7506d..5470bf549d6a93f86b0e611d0a7f0717154579d9 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: cupsfilter.c 6879 2007-08-29 20:26:50Z mike $"
+ * "$Id: cupsfilter.c 7952 2008-09-17 00:56:20Z mike $"
  *
  *   CUPS filtering program for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2010 by Apple Inc.
  *   Copyright 1997-2006 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -75,21 +75,29 @@ static char         TempFile[1024] = "";
  * Local functions...
  */
 
-static int     compare_pids(mime_filter_t *a, mime_filter_t *b);
-static char    *escape_options(int num_options, cups_option_t *options);
-static int     exec_filter(const char *filter, char **argv, char **envp,
-                           int infd, int outfd);
-static int     exec_filters(cups_array_t *filters, const char *infile,
-                            const char *outfile, const char *ppdfile,
-                            const char *printer, const char *user,
-                            const char *title, int num_options,
-                            cups_option_t *options);
-static void    get_job_file(const char *job);
-static int     open_pipe(int *fds);
-static int     read_cupsd_conf(const char *filename);
-static void    set_string(char **s, const char *val);
-static void    sighandler(int sig);
-static void    usage(const char *command, const char *opt);
+static void            add_printer_filter(const char *command, mime_t *mime,
+                                          mime_type_t *printer_type,
+                                          const char  *filter);
+static mime_type_t     *add_printer_filters(const char *command,
+                                            mime_t *mime, const char *printer,
+                                            const char *ppdfile,
+                                            mime_type_t **prefilter_type);
+static int             compare_pids(mime_filter_t *a, mime_filter_t *b);
+static char            *escape_options(int num_options, cups_option_t *options);
+static int             exec_filter(const char *filter, char **argv,
+                                   char **envp, int infd, int outfd);
+static int             exec_filters(mime_type_t *srctype,
+                                    cups_array_t *filters, const char *infile,
+                                    const char *outfile, const char *ppdfile,
+                                    const char *printer, const char *user,
+                                    const char *title, int num_options,
+                                    cups_option_t *options);
+static void            get_job_file(const char *job);
+static int             open_pipe(int *fds);
+static int             read_cupsd_conf(const char *filename);
+static void            set_string(char **s, const char *val);
+static void            sighandler(int sig);
+static void            usage(const char *command, const char *opt);
 
 
 /*
@@ -102,7 +110,10 @@ main(int  argc,                            /* I - Number of command-line args */
 {
   int          i;                      /* Looping vars */
   const char   *command,               /* Command name */
-               *opt;                   /* Current option */
+               *opt,                   /* Current option */
+               *printer;               /* Printer name */
+  mime_type_t  *printer_type,          /* Printer MIME type */
+               *prefilter_type;        /* Printer prefilter MIME type */
   char         *srctype,               /* Source type */
                *dsttype,               /* Destination type */
                super[MIME_MAX_SUPER],  /* Super-type name */
@@ -123,7 +134,8 @@ main(int  argc,                             /* I - Number of command-line args */
   const char   *ppdfile;               /* PPD file */
   const char   *title,                 /* Title string */
                *user;                  /* Username */
-  int          removeppd,              /* Remove PPD file */
+  int          all_filters,            /* Use all filters */
+               removeppd,              /* Remove PPD file */
                removeinfile;           /* Remove input file */
   int          status;                 /* Execution status */
 
@@ -137,6 +149,7 @@ main(int  argc,                             /* I - Number of command-line args */
   else
     command = argv[0];
 
+  printer      = !strcmp(command, "convert") ? "tofile" : "cupsfilter";
   mime         = NULL;
   srctype      = NULL;
   compression  = 0;
@@ -148,6 +161,7 @@ main(int  argc,                             /* I - Number of command-line args */
   ppdfile      = NULL;
   title        = NULL;
   user         = cupsUser();
+  all_filters  = 0;
   removeppd    = 0;
   removeinfile = 0;
 
@@ -202,6 +216,10 @@ main(int  argc,                            /* I - Number of command-line args */
              removeinfile = 1;
              break;
 
+          case 'e' : /* Use every filter from the PPD file */
+             all_filters = 1;
+             break;
+
           case 'f' : /* Specify input file... */
              i ++;
              if (i < argc && !infile)
@@ -329,7 +347,7 @@ main(int  argc,                             /* I - Number of command-line args */
     else
     {
       _cupsLangPuts(stderr,
-                    _("cupsfilter: Only one filename can be specified!\n"));
+                    _("cupsfilter: Only one filename can be specified\n"));
       usage(command, NULL);
     }
 
@@ -353,17 +371,32 @@ main(int  argc,                           /* I - Number of command-line args */
   if (read_cupsd_conf(cupsdconf))
     return (1);
 
-  if ((mime = mimeLoad(ServerRoot, Path)) == NULL)
+  snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
+
+  mime = mimeLoadTypes(NULL, mimedir);
+  mime = mimeLoadTypes(mime, ServerRoot);
+  mime = mimeLoadFilters(mime, mimedir, Path);
+  mime = mimeLoadFilters(mime, ServerRoot, Path);
+
+  if (!mime)
   {
     _cupsLangPrintf(stderr,
-                    _("%s: Unable to read MIME database from \"%s\"!\n"),
-                   command, ServerRoot);
+                    _("%s: Unable to read MIME database from \"%s\" or "
+                     "\"%s\"\n"),
+                   command, mimedir, ServerRoot);
     return (1);
   }
 
-  snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
-  if (!access(mimedir, 0))
-    mime = mimeMerge(mime, mimedir, Path);
+  if (all_filters)
+  {
+    printer_type = add_printer_filters(command, mime, printer, ppdfile,
+                                      &prefilter_type);
+  }
+  else
+  {
+    printer_type   = mimeType(mime, "application", "vnd.cups-postscript");
+    prefilter_type = NULL;
+  }
 
  /*
   * Get the source and destination types...
@@ -375,7 +408,7 @@ main(int  argc,                             /* I - Number of command-line args */
     if ((src = mimeType(mime, super, type)) == NULL)
     {
       _cupsLangPrintf(stderr,
-                     _("%s: Unknown source MIME type %s/%s!\n"),
+                     _("%s: Unknown source MIME type %s/%s\n"),
                      command, super, type);
       return (1);
     }
@@ -383,16 +416,18 @@ main(int  argc,                           /* I - Number of command-line args */
   else if ((src = mimeFileType(mime, infile, infile, &compression)) == NULL)
   {
     _cupsLangPrintf(stderr,
-                    _("%s: Unable to determine MIME type of \"%s\"!\n"),
+                    _("%s: Unable to determine MIME type of \"%s\"\n"),
                    command, infile);
     return (1);
   }
 
   sscanf(dsttype, "%15[^/]/%255s", super, type);
-  if ((dst = mimeType(mime, super, type)) == NULL)
+  if (!strcasecmp(super, "printer"))
+    dst = printer_type;
+  else if ((dst = mimeType(mime, super, type)) == NULL)
   {
     _cupsLangPrintf(stderr,
-                    _("%s: Unknown destination MIME type %s/%s!\n"),
+                    _("%s: Unknown destination MIME type %s/%s\n"),
                    command, super, type);
     return (1);
   }
@@ -409,24 +444,52 @@ main(int  argc,                           /* I - Number of command-line args */
 
     filters = cupsArrayNew(NULL, NULL);
     cupsArrayAdd(filters, &GZIPFilter);
+    GZIPFilter.src = src;
+    GZIPFilter.dst = dst;
   }
   else if ((filters = mimeFilter(mime, src, dst, &cost)) == NULL)
   {
     _cupsLangPrintf(stderr,
-                    _("%s: No filter to convert from %s/%s to %s/%s!\n"),
+                    _("%s: No filter to convert from %s/%s to %s/%s\n"),
                    command, src->super, src->type, dst->super, dst->type);
     return (1);
   }
   else if (compression)
     cupsArrayInsert(filters, &GZIPFilter);
 
+  if (prefilter_type)
+  {
+   /*
+    * Add pre-filters...
+    */
+
+    mime_filter_t      *filter,        /* Current filter */
+                       *prefilter;     /* Current pre-filter */
+    cups_array_t       *prefilters = cupsArrayNew(NULL, NULL);
+                                       /* New filters array */
+
+
+    for (filter = (mime_filter_t *)cupsArrayFirst(filters);
+        filter;
+        filter = (mime_filter_t *)cupsArrayNext(filters))
+    {
+      if ((prefilter = mimeFilterLookup(mime, filter->src,
+                                        prefilter_type)) != NULL)
+       cupsArrayAdd(prefilters, prefilter);
+
+      cupsArrayAdd(prefilters, filter);
+    }
+
+    cupsArrayDelete(filters);
+    filters = prefilters;
+  }
+
  /*
   * Do it!
   */
 
-  status = exec_filters(filters, infile, outfile, ppdfile,
-                        !strcmp(command, "convert") ? "tofile" : "cupsfilter",
-                       user, title, num_options, options);
+  status = exec_filters(src, filters, infile, outfile, ppdfile, printer, user,
+                        title, num_options, options);
 
  /*
   * Remove files as needed, then exit...
@@ -445,6 +508,133 @@ main(int  argc,                           /* I - Number of command-line args */
 }
 
 
+/*
+ * 'add_printer_filter()' - Add a single filters from a PPD file.
+ */
+
+static void
+add_printer_filter(
+    const char  *command,              /* I - Command name */
+    mime_t      *mime,                 /* I - MIME database */
+    mime_type_t *filtertype,           /* I - Printer or prefilter MIME type */
+    const char  *filter)               /* I - Filter to add */
+{
+  char         super[MIME_MAX_SUPER],  /* Super-type for filter */
+               type[MIME_MAX_TYPE],    /* Type for filter */
+               program[1024];          /* Program/filter name */
+  int          cost;                   /* Cost of filter */
+  mime_type_t  *temptype;              /* MIME type looping var */
+  char         filename[1024];         /* Full filter filename */
+
+
+ /*
+  * Parse the filter string; it should be in the following format:
+  *
+  *     super/type cost program
+  */
+
+  if (sscanf(filter, "%15[^/]/%31s%d%*[ \t]%1023[^\n]", super, type, &cost,
+             program) != 4)
+  {
+    _cupsLangPrintf(stderr, _("%s: Invalid filter string \"%s\"\n"), command,
+                    filter);
+    return;
+  }
+
+ /*
+  * See if the filter program exists; if not, stop the printer and flag
+  * the error!
+  */
+
+  if (strcmp(program, "-"))
+  {
+    if (program[0] == '/')
+      strlcpy(filename, program, sizeof(filename));
+    else
+      snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program);
+
+    if (access(filename, X_OK))
+    {
+      _cupsLangPrintf(stderr, _("%s: Filter \"%s\" not available: %s\n"),
+                      command, program, strerror(errno));
+      return;
+    }
+  }
+
+ /*
+  * Add the filter to the MIME database, supporting wildcards as needed...
+  */
+
+  for (temptype = mimeFirstType(mime);
+       temptype;
+       temptype = mimeNextType(mime))
+    if (((super[0] == '*' && strcasecmp(temptype->super, "printer")) ||
+         !strcasecmp(temptype->super, super)) &&
+        (type[0] == '*' || !strcasecmp(temptype->type, type)))
+      mimeAddFilter(mime, temptype, filtertype, cost, program);
+}
+
+
+/*
+ * 'add_printer_filters()' - Add filters from a PPD file.
+ */
+
+static mime_type_t *                   /* O - Printer type or NULL on error */
+add_printer_filters(
+    const char  *command,              /* I - Command name */
+    mime_t      *mime,                 /* I - MIME database */
+    const char  *printer,              /* I - Printer name */
+    const char  *ppdfile,              /* I - PPD file */
+    mime_type_t **prefilter_type)      /* O - Prefilter type */
+{
+  int        i;                        /* Looping var */
+  mime_type_t *printer_type;           /* Printer MIME type */
+  ppd_file_t  *ppd;                    /* PPD file data */
+  ppd_attr_t  *ppdattr;                        /* Current prefilter */
+
+
+  *prefilter_type = NULL;
+
+  if ((ppd = ppdOpenFile(ppdfile)) == NULL)
+  {
+    ppd_status_t  status;              /* PPD load status */
+
+    status = ppdLastError(&i);
+    _cupsLangPrintf(stderr, _("%s: Unable to open PPD file: %s on line %d\n"),
+                    command, ppdErrorString(status), i);
+    return (NULL);
+  }
+
+  printer_type = mimeAddType(mime, "printer", printer);
+
+  if (ppd->num_filters > 0)
+  {
+    for (i = 0; i < ppd->num_filters; i ++)
+      add_printer_filter(command, mime, printer_type, ppd->filters[i]);
+  }
+  else
+  {
+    add_printer_filter(command, mime, printer_type,
+                       "application/vnd.cups-command 0 commandtops");
+    add_printer_filter(command, mime, printer_type,
+                       "application/vnd.cups-postscript 0 -");
+  }
+
+  if ((ppdattr = ppdFindAttr(ppd, "cupsPreFilter", NULL)) != NULL)
+  {
+    *prefilter_type = mimeAddType(mime, "prefilter", printer);
+
+    for (; ppdattr; ppdattr = ppdFindNextAttr(ppd, "cupsPreFilter", NULL))
+      if (ppdattr->value)
+       add_printer_filter(command, mime, *prefilter_type, ppdattr->value);
+  }
+  else
+    *prefilter_type = NULL;
+
+  return (printer_type);
+}
+
+
 /*
  * 'compare_pids()' - Compare two filter PIDs...
  */
@@ -531,7 +721,8 @@ exec_filter(const char *filter,             /* I - Filter to execute */
            int        infd,            /* I - Stdin file descriptor */
            int        outfd)           /* I - Stdout file descriptor */
 {
-  int          pid;                    /* Process ID */
+  int          pid,                    /* Process ID */
+               fd;                     /* Temporary file descriptor */
 #if defined(__APPLE__)
   char         processPath[1024],      /* CFProcessPath environment variable */
                linkpath[1024];         /* Link path for symlinks... */
@@ -575,28 +766,40 @@ exec_filter(const char *filter,           /* I - Filter to execute */
 
     if (infd != 0)
     {
-      close(0);
+      if (infd < 0)
+        infd = open("/dev/null", O_RDONLY);
+
       if (infd > 0)
-        dup(infd);
-      else
-        open("/dev/null", O_RDONLY);
+      {
+        dup2(infd, 0);
+       close(infd);
+      }
     }
 
     if (outfd != 1)
     {
-      close(1);
-      if (outfd > 0)
-       dup(outfd);
-      else
-        open("/dev/null", O_WRONLY);
+      if (outfd < 0)
+        outfd = open("/dev/null", O_WRONLY);
+
+      if (outfd > 1)
+      {
+       dup2(outfd, 1);
+       close(outfd);
+      }
     }
 
-    close(3);
-    open("/dev/null", O_RDWR);
+    if ((fd = open("/dev/null", O_RDWR)) > 3)
+    {
+      dup2(fd, 3);
+      close(fd);
+    }
     fcntl(3, F_SETFL, O_NDELAY);
 
-    close(4);
-    open("/dev/null", O_RDWR);
+    if ((fd = open("/dev/null", O_RDWR)) > 4)
+    {
+      dup2(fd, 4);
+      close(fd);
+    }
     fcntl(4, F_SETFL, O_NDELAY);
 
    /*
@@ -619,7 +822,8 @@ exec_filter(const char *filter,             /* I - Filter to execute */
  */
 
 static int                             /* O - 0 on success, 1 on error */
-exec_filters(cups_array_t  *filters,   /* I - Array of filters to run */
+exec_filters(mime_type_t   *srctype,   /* I - Source type */
+             cups_array_t  *filters,   /* I - Array of filters to run */
              const char    *infile,    /* I - File to filter */
             const char    *outfile,    /* I - File to create */
             const char    *ppdfile,    /* I - PPD file, if any */
@@ -631,9 +835,10 @@ exec_filters(cups_array_t  *filters,       /* I - Array of filters to run */
 {
   int          i;                      /* Looping var */
   const char   *argv[8],               /* Command-line arguments */
-               *envp[11],              /* Environment variables */
+               *envp[15],              /* Environment variables */
                *temp;                  /* Temporary string */
   char         *optstr,                /* Filter options */
+               content_type[1024],     /* CONTENT_TYPE */
                cups_datadir[1024],     /* CUPS_DATADIR */
                cups_fontpath[1024],    /* CUPS_FONTPATH */
                cups_serverbin[1024],   /* CUPS_SERVERBIN */
@@ -641,6 +846,9 @@ exec_filters(cups_array_t  *filters,        /* I - Array of filters to run */
                lang[1024],             /* LANG */
                path[1024],             /* PATH */
                ppd[1024],              /* PPD */
+               printer_info[255],      /* PRINTER_INFO env variable */
+               printer_location[255],  /* PRINTER_LOCATION env variable */
+               printer_name[255],      /* PRINTER env variable */
                rip_cache[1024],        /* RIP_CACHE */
                userenv[1024],          /* USER */
                program[1024];          /* Program to run */
@@ -654,6 +862,7 @@ exec_filters(cups_array_t  *filters,        /* I - Array of filters to run */
   cups_array_t *pids;                  /* Executed filters array */
   mime_filter_t        key;                    /* Search key for filters */
   cups_lang_t  *language;              /* Current language */
+  cups_dest_t  *dest;                  /* Destination information */
 
 
  /*
@@ -662,6 +871,8 @@ exec_filters(cups_array_t  *filters,        /* I - Array of filters to run */
 
   optstr = escape_options(num_options, options);
 
+  snprintf(content_type, sizeof(content_type), "CONTENT_TYPE=%s/%s",
+           srctype->super, srctype->type);
   snprintf(cups_datadir, sizeof(cups_datadir), "CUPS_DATADIR=%s", DataDir);
   snprintf(cups_fontpath, sizeof(cups_fontpath), "CUPS_FONTPATH=%s", FontPath);
   snprintf(cups_serverbin, sizeof(cups_serverbin), "CUPS_SERVERBIN=%s",
@@ -693,6 +904,34 @@ exec_filters(cups_array_t  *filters,       /* I - Array of filters to run */
   snprintf(rip_cache, sizeof(rip_cache), "RIP_CACHE=%s", RIPCache);
   snprintf(userenv, sizeof(userenv), "USER=%s", user);
 
+  if (printer &&
+      (dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer, NULL)) != NULL)
+  {
+    if ((temp = cupsGetOption("printer-info", dest->num_options,
+                              dest->options)) != NULL)
+      snprintf(printer_info, sizeof(printer_info), "PRINTER_INFO=%s", temp);
+    else
+      snprintf(printer_info, sizeof(printer_info), "PRINTER_INFO=%s", printer);
+
+    if ((temp = cupsGetOption("printer-location", dest->num_options,
+                              dest->options)) != NULL)
+      snprintf(printer_location, sizeof(printer_location),
+               "PRINTER_LOCATION=%s", temp);
+    else
+      strlcpy(printer_location, "PRINTER_LOCATION=Unknown",
+              sizeof(printer_location));
+  }
+  else
+  {
+    snprintf(printer_info, sizeof(printer_info), "PRINTER_INFO=%s",
+             printer ? printer : "Unknown");
+    strlcpy(printer_location, "PRINTER_LOCATION=Unknown",
+            sizeof(printer_location));
+  }
+
+  snprintf(printer_name, sizeof(printer_name), "PRINTER=%s",
+          printer ? printer : "Unknown");
+
   argv[0] = (char *)printer;
   argv[1] = "1";
   argv[2] = user;
@@ -706,16 +945,20 @@ exec_filters(cups_array_t  *filters,      /* I - Array of filters to run */
     argv[4] = "1";
 
   envp[0]  = "<CFProcessPath>";
-  envp[1]  = cups_datadir;
-  envp[2]  = cups_fontpath;
-  envp[3]  = cups_serverbin;
-  envp[4]  = cups_serverroot;
-  envp[5]  = lang;
-  envp[6]  = path;
-  envp[7]  = ppd;
-  envp[8]  = rip_cache;
-  envp[9]  = userenv;
-  envp[10] = NULL;
+  envp[1]  = content_type;
+  envp[2]  = cups_datadir;
+  envp[3]  = cups_fontpath;
+  envp[4]  = cups_serverbin;
+  envp[5]  = cups_serverroot;
+  envp[6]  = lang;
+  envp[7]  = path;
+  envp[8]  = ppd;
+  envp[9]  = printer_info;
+  envp[10] = printer_location;
+  envp[11] = printer_name;
+  envp[12] = rip_cache;
+  envp[13] = userenv;
+  envp[14] = NULL;
 
   for (i = 0; argv[i]; i ++)
     fprintf(stderr, "DEBUG: argv[%d]=\"%s\"\n", i, argv[i]);
@@ -823,10 +1066,10 @@ exec_filters(cups_array_t  *filters,     /* I - Array of filters to run */
       if (status)
       {
        if (WIFEXITED(status))
-         fprintf(stderr, "ERROR: %s (PID %d) stopped with status %d!\n",
+         fprintf(stderr, "ERROR: %s (PID %d) stopped with status %d\n",
                  filter->filter, pid, WEXITSTATUS(status));
        else
-         fprintf(stderr, "ERROR: %s (PID %d) crashed on signal %d!\n",
+         fprintf(stderr, "ERROR: %s (PID %d) crashed on signal %d\n",
                  filter->filter, pid, WTERMSIG(status));
 
         retval = 1;
@@ -877,13 +1120,13 @@ get_job_file(const char *job)            /* I - Job ID */
 
   if (jobid < 1 || jobid > INT_MAX)
   {
-    _cupsLangPrintf(stderr, _("cupsfilter: Invalid job ID %d!\n"), (int)jobid);
+    _cupsLangPrintf(stderr, _("cupsfilter: Invalid job ID %d\n"), (int)jobid);
     exit(1);
   }
 
   if (docnum < 1 || docnum > INT_MAX)
   {
-    _cupsLangPrintf(stderr, _("cupsfilter: Invalid document number %d!\n"),
+    _cupsLangPrintf(stderr, _("cupsfilter: Invalid document number %d\n"),
                     (int)docnum);
     exit(1);
   }
@@ -910,9 +1153,7 @@ get_job_file(const char *job)              /* I - Job ID */
 
   if ((tempfd = cupsTempFd(TempFile, sizeof(TempFile))) == -1)
   {
-    _cupsLangPrintf(stderr,
-                    _("cupsfilter: Unable to create temporary file: %s\n"),
-                    strerror(errno));
+    _cupsLangPrintError(_("ERROR: Unable to create temporary file"));
     httpClose(http);
     exit(1);
   }
@@ -1049,7 +1290,7 @@ read_cupsd_conf(const char *filename)     /* I - File to read */
   }
 
   snprintf(line, sizeof(line),
-           "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR ":/bin/usr/bin",
+           "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR ":/bin:/usr/bin",
           ServerBin);
   set_string(&Path, line);
 
@@ -1103,7 +1344,7 @@ usage(const char *command,                /* I - Command name */
       const char *opt)                 /* I - Incorrect option, if any */
 {
   if (opt)
-    _cupsLangPrintf(stderr, _("%s: Unknown option '%c'!\n"), command, *opt);
+    _cupsLangPrintf(stderr, _("%s: Unknown option '%c'\n"), command, *opt);
 
   if (!strcmp(command, "cupsfilter"))
     _cupsLangPuts(stdout,
@@ -1112,6 +1353,7 @@ usage(const char *command,                /* I - Command name */
                    "Options:\n"
                    "\n"
                    "  -c cupsd.conf    Set cupsd.conf file to use\n"
+                   "  -e               Use every filter from the PPD file\n"
                    "  -j job-id[,N]    Filter file N from the specified job (default is file 1)\n"
                    "  -n copies        Set number of copies\n"
                    "  -o name=value    Set option(s)\n"
@@ -1123,6 +1365,7 @@ usage(const char *command,                /* I - Command name */
                    "\n"
                    "Options:\n"
                    "\n"
+                   "  -e                   Use every filter from the PPD file\n"
                    "  -f filename          Set file to be converted (otherwise stdin)\n"
                    "  -o filename          Set file to be generated (otherwise stdout)\n"
                    "  -i mime/type         Set input MIME type (otherwise auto-typed)\n"
@@ -1140,5 +1383,5 @@ usage(const char *command,                /* I - Command name */
 
 
 /*
- * End of "$Id: cupsfilter.c 6879 2007-08-29 20:26:50Z mike $".
+ * End of "$Id: cupsfilter.c 7952 2008-09-17 00:56:20Z mike $".
  */