Print filters. Whether it's CUPS, LPRng or plain old LPD, you
often need a filter in between application data and the physical
printer. In olden times, you'd use specific filters for specific
purposes, but the trend now is to Swiss army knife, do everything
filters that consult config files or databases to determine their
actions (which is often just calling Ghostscript with appropriate
With some older lpd's (SCO's, for example), you couldn't specify a filter. We'd get around that by fronting with a Sys V printer where you could use a filter - an "interface script" that would end by sending to the lpd printer. More modern lpd's let you specify a "if=" line in printcap.
You can use your own filter scripts with CUPS, too, but you have to work within a "ppd" file. You just create the printer normally, but then change things. Your contribution would be a line added to the .ppd file that might look like:
*cupsFilter: "text/plain 0 MyFilter"
You'd create MyFilter in /usr/lib/cups/filter/ and the ppd file would be /etc/cups/ppd/queue-name.ppd
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-06 Tony Lawrence
One day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" (Larry Wall)