apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.91k stars 462 forks source link

Let IPP backend send all options to the printer also if the document format is PCLm #5223

Closed tillkamppeter closed 6 years ago

tillkamppeter commented 6 years ago

Currently, the IPP CUPS backend passes through all the options (from the 5th command line argument) only if the output format is PDF or some "image/..." mime type, which covers PWG Raster and Apple Raster. Besides these three formats also PCLm is a common format used by IPP printers and as PCLm also does not allow embedding option settings in the job (PostScript allows that, most other PDLs not) it should be possible to send the settings as IPP attributes. This is also the intention of how PCLm should be used. The IPP backend (backend/ipp.c) uses the following code to decide whether to pass through all command line options as IPP attributes or not:

  if (argc == 6)
  {
    num_files    = 0;
    files        = NULL;
    send_options = !_cups_strcasecmp(final_content_type, "application/pdf") ||
                   !_cups_strcasecmp(final_content_type, "application/vnd.cups-pdf") ||
                   !_cups_strncasecmp(final_content_type, "image/", 6);

    fputs("DEBUG: Sending stdin for job...\n", stderr);
  }

One could simple add a check for application/PCLm here. I know that driverless printing is usually covered already by PDF, PWG Raster, and Apple Raster, due to the fact that printer manufacturers usually do not leave out AirPrint support in their driverless IPP implementations, but Lexmark would like to use PCLm for "classic" (with Lexmark-provided PPD) printing. Also we would get a symmetry of all 4 driverless PDLs being supported the same way.

michaelrsweet commented 6 years ago

We have no desire to support this format officially.