Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add IPP attributes required by IPP Everywhere for PWG Raster when PWG Raster as input format is supported #4428
The specs for IPP Everywhere (section 5.3 "IPP Printer Description Attributes", page 37) require the following printer IPP attributes to tell clients which types of PWG Raster input files are supported by this printer:
With the attached patch I add these attributes (only if PWG Raster is available as input format, for example with cups-filters 1.0.54 which introduces the rastertopdf filter), so that a print queue shared by a CUPS server completely emulates an IPP Everywhere printer and for example mobile devices or appliances (like digital cameras) supporting IPP Everywhere printers via PWG Raster can print on the shared CUPS queue.
The patch checks at first if PWG Raster is one of the input formats and add the attributes only then. For pwg-raster-document-resolution-supported it copies the arguments of "printer-resolution-supported", for pwg-raster-document-sheet-back it always takes "normal" (the actual sheet back handling is done on the CUPS server) and for pwg-raster-document-type-supported it takes the following:
These are the formats the rastertopdf filter of cups-filters currently is able to convert.
I have simply made a patch which works, feel free to put it at a different place in the scheduler code or modify it.
CUPS.org User: mike
OK, we can't use this patch as-is. Among other things, we should be pulling the values from the PPD file (right now you assume 300/600/1200 DPI, all color spaces, and normal duplexing), otherwise existing raster drivers will simply not work.
Putting this in the 2.1 pile for now, but if I get a chance I'll re-work it for 2.0.
CUPS.org User: till.kamppeter
For the resolution I do not simply assume 300/600/1200 DPI, I first check whether there is already a resolution option and if so, I copy the resolutions from it,only if there is no resolution option, I assume 300/600/1200 DPI.
For the back side I always use "normal" as the PWG Raster input always gets turned to PDF by the server and then the further filtering steps (pdftopdf -> gstoraster/pdftoraster -> rasterto...) handle the correct back side orientation for the printer.
Color spaces are also converted by the filter chain on the CUPS server so it is no problem that I accept all color spaces with any printer.
My workflow never passes PWG Raster directly through from the client to the printer, even if the printer understands PWG Raster natively. So CUPS page management (selected pages, mirror, even/odd, N-up, ...) is always supported as all jobs go through pdftopdf and a mobile device sending PWG Raster can print to any non-raw CUPS queue, also if the printer is for example an old LaserJet which only understands PCL or a Samsung using the SpliX driver, like we always could print JPG images on any CUPS queue all the time (and if the printer understands JPG natively the jobs still go through pdftopdf).
As all jobs go through pdftopdf the client does not need to know the fine detail of the actual printer. It gets the resolution to avoid Moiré effects of printing a 600-dpi image on a 720-dpi Epson inkjet, it gets not of the presence of duplex support to allow the user to send duplex jobs, but the client does not need to bother with back side oriantation and the printer's native color spaces as the server takes care of that in the filter chain. So a mobile client device can work with a very simple printing stack.