4.19. PCL and the ifhp Filter

While PostScript is the most widely support Print Job Language, there are large number of printers that support only PCL. The ifhp filter has support for a PCL only printer.

Modify the printcap as shown below and use lpc lpd to restart lpd.

    lp:sd=/var/spool/lpd/%P
      :force_localhost
      :lp=/tmp/lp
      # modify the path to ifhp appropriately
      :ifhp=model=pclonly
      :filter=/usr/local/libexec/filters/ifhp


Now print the file /tmp/hi, and then display the output in /tmp/lp using a text editor such as vi or emacs that shows control characters:

    h4: {210} % cp /dev/null /tmp/lp
    h4: {211} % lpr /tmp/hi
    h4: {212} % vi /tmp/lp
    ^]E^]&^]&k2G^]&s0C^]&l0O^]9^](s0P^](s10.00H^](s4099Thi
    ^]E


The output now contains the necessary PCL start of job, format setup, and end of job sequences needed to print on a PCL printer.