[cups] How to build and use my own CUPS filter.
jsmeix at suse.de
Fri Nov 21 04:37:12 PST 2014
On Nov 21 12:53 Vincent Farget wrote (excerpt):
> If I understand well the process of printing from Windows using CUPS server,
> the Windows driver (Canon iR5055/iR5065 PS3 -> postcript specific CANON
> driver) The program formats the print file from the program which call the
> printer to a postcript format (transformation) and send it to the CUPS server
> which does not modify it and send it to the printer.
provides additional help in understanding the process
of printing from Windows to a Linux CUPS server.
> My questions are :
> Is it possible to tell CUPS to get the "windows postcript"
> print job into a (or more) filter(s) ?
Everything is possible because the CUPS filtering system
(i.e. what converts data as needed) is not hardcoded
but fully adaptable to any need.
> If the answer is yes, where this can be done ?
I think there is no general answer - al least I don't know one.
I think you need to develop your own specific filter for your particular
> Is there somebody who have a "good" HOWTO (documentation) to build
> and also use our own CUPS filter ?
provides sufficient help in understanding the CUPS filtering process
so that you can develop your own specific filter for your particular
needs in your particular environment.
The article is a bit old but in general it should still apply.
Adapting the default CUPS filtering system could
become a bit tricky.
When the Windows clients submit printing data to the CUPS server
via the SMB protocol, then the recipient on the CUPS server
is not CUPS (i.e. the cupsd) but Samba and then Samba forwards
it to the cupsd.
Usually when Samba gets printing data from Windows clients
it forwards it explicitly marked as "raw" to the cupsd.
But "raw" data is not at all processed by the CUPS
filtering system, see
In this case you need to change the Samba settings on the
CUPS server to no longer forward printing data from Windows
clients as "raw" so that the CUPS filtering system will be used.
Likely the default CUPS filtering system will not work correctly
for printer specific data that was made by a Windows driver.
In this case you need to adapt the default CUPS filtering system
according to your particular needs for your particular Windows
When the Windows driver produces printer specific PostSript
(probably together with a printer specific JCL header) and
you only need to modify it in a hardcoded way, it is relatively
easy because both PostSript and JCL are basically plain ASCII text
so that an appropriate "System V style interface script"
that calls 'sed' or whatever similar programs (e.g. 'awk')
should be sufficient for your particular needs.
SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
More information about the cups