Add enscript filter to CUPS printer

Helge Blischke h.blischke at srz.de
Tue Mar 7 04:09:43 PST 2006


Anonymous wrote:
> 
> I'm having a problem adding an enscript command as a CUPS filter. I have the following script code4up which I added to /usr/lib/cups/filter
> 
> #!/bin/bash
> enscript -G2rE -U2
> 
> and changed mime.convs to use code4up instead of texttops for application/x-perl and restarted cupsd. But the enscript filter is not being applied to an input file like perlsource.pl.
> 
> What am I missing?
> 
> Once the filter works, I'd like to be able to use it without changing the global mime.convs file. How do I do that? By adding a printer using a new ppd file that has the cupsFilter directive set to code4up, or is there an easier way to specify a filter per job?
> 
> Thanks,
> Zartaj

First of all, you need to redesign your shell script (which calls enscript) to match the
conventions for CUPS filters, especially regarding the commend line options. For details see the
Software Programmers Manual that comes with the CUPS documentation.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups mailing list