[cups.general] CUPS filtering

Helge Blischke H.Blischke at srz-berlin.de
Sun Dec 12 08:50:06 PST 2004


Pascal DeMilly wrote:
> 
> Helge,
> 
> Thanks for answering back. What I don't understand is why the last
> printer in the chain doesn't look at what it is receiving, see that it
> is a postscript file and do a pstorasterize before sending it to the
> laserjet filter? I thought this was the way cups worked. Everything up
> to the last filter is geared toward postscript.
> 
> There is a file in my /etc/cups directory a mime.convs. In that file
> there is a mimetype called:
> 
> application/vnd.cups-postscript        application/vnd.cups-raster     100     pstoraster
> 
> Should I enable this? And what is the difference between that file and
> pstoraster.convs and mime.convs?
> 

Well, I'll try to sketch out how CUPS works:

(1) checking the incoming print stream against the mime.types (and user
supplied xxx.types
    files, if appropriate), the CUPS scheduler determines the initial
document type.
(2) The final data type - that is, what the printer accepts - is
determined as follows:
    - if the printer's PPD does *not* contain a line starting with
"*cupsFilter: ",
      the final data type is assumed as application/vnd.cups-postscript.
    - otherwise the final data type is taken from the cupsFilter line,
for example, if
      this line reads:
      *cupsFilter:        "application/vnd.cups-raster 0 rastertoepson"
      the scheduler knows from this line that the final data is
generated by a filter
      named rastertoepson the input data type of which is
application/vnd.cups-raster.
    - there is a third variant: the line
      *cupsFilter: "application/vnd.cups-raster 0 -"
      e.g. would tell the scheduler that this data type is digested
directly by the
      printer.
(3) Now you have two data types: the one of the incoming data and the
one specified by
    the printer's PPD. The scheduler now consults the mime.convs (and
xxx.convs files
    if they exist) to set up a conversion chain that specifies the data
conversion from
    the initial to the final data type. (Possibly there are several
chains, then 
    the one having the least cost is chosen; the cost per filter is the
integer just
    preceding the filter name).

With this (sketchy, though) information please re-think your problem.

Helge



-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
tel: +49 30 75301-360




More information about the cups mailing list