IF-PSPRINT(1)

NAME
if-psprint - send text, postscript, or native printer language to arbitrary printer.

SYNOPSIS
Designed as a quick fix for the random printers that get hooked up to the NetBSD server and random Windows boxes around the office. Uses enscript to convert text to postscript, and ghostcript to convert to native printer language as required.

DESCRIPTION

•   Overloads 'af' entry to contain printer type, and optional location. in the form 'type[.model][/smb/smb_dest]'. Use type 'ps' for no gs filter.

•   Reads first 1k and calls 'file' to determine filetype.

•   Builds a spool command based on filetype:

    •   If text and not postscript, use enscript text->postscript

    •   If enscripted or postscript, use gs postscript->printer_format

    •   Otherwise assumed to be native printer language (its your rope)

•   Open pipe to spool command, send first 1k, then rest of data

•   requires ghostscript, enscript, and samba if printing to smb hosts

EXAMPLE PRINTCAP ENTRIES
(Remember to create spool dir [sd])

•   HP deskjet named 'leaves' connected to smb host 'tea'. (using ghostscript 'hpdj' driver model 'unspec')

      leaves:\
        :if=/usr/pkg/libexec/if-psprint:lf=/var/log/lpd-errs:\
        :sh:mx=0:lp=/dev/null:sd=/var/spool/lpd/leaves:\
        :af=hpdj.unspec/smb/tea/leaves:

•   Canon bubblejet connected to /dev/lpa0 (using gs 'bjc800' driver)

      bubbly:\
        :if=/usr/pkg/libexec/if-psprint:lf=/var/log/lpd-errs:\
        :sh:mx=0:lp=/dev/lpa0:sd=/var/spool/lpd/bubbly:\
        :af=bjc800: