[Home]Ghostscript Print Filter

It is very easy, and highly recommended, to set up a default printer using a Ghostscript based print filter:

With this in /etc/printcap :

 # HP Laserjet 1100
 # Set Default Printer
 lp|ljet:\ 
        :lp=/dev/lp0:\
        :sd=/var/spool/lpd/lp:\
        :if=/usr/local/bin/lpfilter:\
        :mx#0:\
        :sh

Then /usr/local/bin/lpfilter should look like:

 #!/bin/sh
 exec /usr/bin/gs -q -dSAFER -sDEVICE=ljet4 -r600 -dNOPAUSE -sOutputFile=- -

Some ill behaved printers, like the Kyocera FS-1010, require a kick to make them behave. In this example of a lpfilter file for the Kyocera FS-1010, we are forcing the laserjet 4 emulation mode (PCL5):

 #!/bin/sh
 echo -en '!R! FRPO P8, 0; EXIT' > /dev/usb/lp0
 sleep 2
 /usr/local/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=pxlmono -sOutputFile=- -

Silverlake Linux Users Group Wiki | Recent Changes | Preferences
Password required to edit | View other revisions
Last edited July 26, 2004 8:46 pm by Phil (diff)
Search: