Subject: bin/11907: Default /etc/printcap file needs more modern samples
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/07/2001 06:08:19
>Number:         11907
>Category:       bin
>Synopsis:       Default /etc/printcap file needs more modern samples
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 07 06:08:01 PST 2001
>Originator:     Anders Dinsen
>Release:        1.5
Anders Dinsen
System: NetBSD box 1.5 NetBSD 1.5 (BOX) #0: Wed Dec 27 21:49:47 CET 2000 anders@box:/usr/src/sys/arch/i386/compile/BOX i386

The default /etc/printcap has no entries that are suitable for
PostScript printers. This caused me great trouble because the default
entry for "lp" does not suppress a header page. A printer entry with
a postscript filter would also be very useful.

Try printing on a PostScript printer with the default printcap
entry for "lp".

Include the following sample entry in the default /etc/printcap:

ps|PostScript printer:\

The following entry would also be useful in combination with the
script given below (requires installation of the a2ps package) since
it turns queue lp into an ordinary ASCII printer:

lp|Line printer with PostScript filter:\

Here is a script that will do the filter job:

# This is an ascii to PostScript filter intended for use as an
# output filter in a printer entry in /etc/printcap. E.g.:
# lp|Line printer with PostScript filter:\
#     :lp=/dev/null:sh:sd=/var/spool/lpd:of=/usr/local/libexec/psf:pl#70:pw#80:
# This script requires that the a2ps package is installed.

# These are the defaults stated in printcap(5)

# This is the page format, e.g. ISO A4 or letter

# PostScript queue

args=`getopt w:l: $*`
set -- $args
for i
   case "$i"
		   width=$2; shift; shift;;
		   length=$2; shift; shift;;
		   shift; break;;
/usr/pkg/bin/a2ps -q -1 -M $medium --borders no --no-header -L $length -l $width -P$outputQueue 2>&1 | logger -p -t $0