how cups detect printer language?

pipitas k1pfeifle at gmx.net
Fri Oct 22 15:58:45 PDT 2004


anonymous wrote:

> Question:
> 1. After providing a PPD file, how can CUPS know whether it's a Postscript
> printer or PCL?

CUPS reads the PPD file. It looks for lines at the beginning of
the PPD starting with "*cupsFilter:".

If it doesnt find any such line it assumes it is a PostScript
printer and converts everything it can print to PostScript to
send this.

If it detects, f.e. 

  *cupsFilter: "application/vnd.cups-raster 33 foobar"

it does everything it can to create (by its own means) MIME type
"application/vnd.cups-raster" and then calls "foobar". It doesnt
necessarily know what "foobar" does -- but as it is read from the
Printer Description file, it must be The Right Thing To Do (TM).
After foobar is finished, CUPS hands the file to the printers
"backend" (socket, lpd, parallel, smb,.... whatever) so it gets
send to the device.

> 2. Can CUPS print text/PCL file to a PCL printer?

Yes. In that case "foobar" turns out to be "rastertohp" or
"rastertopcl".

Or, you may have

  *cupsFilter: "text/plain 33 texttopcl"

Cheers,
Kurt




More information about the cups mailing list