12.9. Parallel Printer

The parallel printer printcap is very simple.

# parallel printer
lp:
   :lp=/dev/lpr
  1. The lp=/dev/lpr specifies that lpd should open the device for APPEND and simply transfer job files to it.

  2. The sh and sf will prevent lpd from trying to generate banner pages or put form feeds between jobs.

If you discover that UNIX print jobs result in a staircase appearance, then you need to force your printer to do LF (linefeed) to CR/LF (carriage return/line feed) translation, or do the translation yourself.

# Simple parallel printer
lp:
   :lp=/dev/lpr
   :filter=/usr/local/bin/lpf

By using the if=...lpf filter, the job will be passed through the lpf filter, which will do the LF to CR/LF translation.

If you have a more complex printer that handles PostScript, PCL, and PJL, then you will need to use the more powerful ifhp filter:

# Simple parallel printer
lp:
   :lp=/dev/lpr
   :ifhp=model=hp4,status@
   :of=/usr/local/libexec/filters/ifhp
   :filter=/usr/local/libexec/filters/ifhp

See ifhp Filter for details. This entry will specify that the printer is an HP4, and that no status information is available. This is usually the case with a parallel port.