From owner-freebsd-hackers Sun Jul 20 17:28:10 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id RAA10285 for hackers-outgoing; Sun, 20 Jul 1997 17:28:10 -0700 (PDT) Received: from smtp.interlog.com (root@smtp.interlog.com [198.53.145.6]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id RAA10280 for ; Sun, 20 Jul 1997 17:28:08 -0700 (PDT) Received: from ip226-167.cc.interlog.com (ip226-167.cc.interlog.com [207.34.226.167]) by smtp.interlog.com (8.8.3/8.7.6) with SMTP id UAA19571; Sun, 20 Jul 1997 20:27:51 -0400 (EDT) Message-Id: <199707210027.UAA19571@smtp.interlog.com> Comments: Authenticated sender is From: "Harold Smorodin" To: Al Johnson Date: Sun, 20 Jul 1997 20:26:47 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: HP LaserJet 6L Reply-to: shws@pobox.com CC: freebsd-hackers@FreeBSD.ORG Priority: normal In-reply-to: <01BC939C.46CF4020.Al.Johnson@AJC.State.Net> X-mailer: Pegasus Mail for Windows (v2.54) Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Hey folks, > > I'm trying to migrate all my ciritical functions from Win95 to > FreeBSD. Ya, I hear you all groaning now :) Since I'm no expert at > this, been a long time since I was a unix sysadmin, I need > assistance with the filters needed for this printer. I have > successfully printed plain text on the HP from the directly > connected system sort of. An lptest > /dev/lpt0 gets me a sheet of > paper with a single line printed on it. Obvisouly not what it's > supposed to generate. Anyone with a filter or an adequate printcap > definition for this (or just about any PCL) printer I would really > appreciate an email copy. > > In addition, is there any special setup required to get the > appropriate conversion from a Win95 print job to the printer via > Samba? > > -- Al > The following HP filter is what I use: ================== Begin Script ================================ #!/bin/sh # The above assumes that the Bourne Shell is available # # Filter for HP printers # # This file MUST be created using command: cat > hpcrlf # # When finished entering, use Ctrl-d to return to system prompt # (Press/hold the Ctrl key and strike the d key) # # The character (Hex 1B) is entered as Alt-027: # (Press/hold the Alt key and enter: 027 on the NUMERIC key pad) # # Create this script signed on as: root # Script name: hpcrlf # Script location: /usr/spool # Script permissions: chmod 775 hpcrlf # Script ownership: chown root:wheel hpcrlf # After installation, execute command: rehash # # Once created, this script may be edited using the vi editor, # PROVIDED you don't delete, alter, or overwrite the # character which displays as a ^ [ character pair in the vi # editor. # # In the lines that follow, enter as Alt-027 # # Treat LF as CRLF echo -n \&k2G # Symbol Set: (8U = HP Roman-8 echo -n \(8U # Font: 12cpi 10pt Upright Medium Courier echo -n \(s0p12.00h10.0v0s0b3T # End-of-Line Wrap echo -n \&s0C # Printer data stream cat # Printer Reset (CRLF Treatment) echo -n \&k0G =========================== End Script ========================= The following is my printcap script: ================== Begin Script ================================ # # Reference: printcap(5) # Script name: printcap # Script location: /etc # Set ownership & permissions as required # lp|HP LaserJet:\ :sh:\ :mx#0:\ :lp=/dev/lpt0:\ :sd=/var/spool/lpd:\ :lf=/var/log/lpd-errs:\ :of=/usr/spool/hpcrlf: =========================== End Script ========================= I use the following script to print configuration files: ================== Begin Script ================================ #!/bin/sh # Shell script for printing text files # # Script name: prfile # Script location: /usr/local/bin # Script permissions: chmod 775 prfile # Script ownership: chown root:wheel prfile # After installation, execute command: rehash # case $# in 1) [ -r $PWD'/'$1 ] if [ "$?" = 0 ] then if [ $PWD = '/' ] then cat $1 | pr -h $1 -o 9 | lpr else cat $1 | pr -h $PWD'/'$1 -o 9 | lpr fi else cat $1 | pr -h $1 -o 9 | lpr fi ;; *) echo "$0: Invalid argument count: $#" >&2 echo " " >&2 echo "Usage: $0 filename" >&2 echo " " >&2 ;; esac =========================== End Script ========================= I use the following script to print man pages: ================== Begin Script ================================ #!/bin/sh # Shell script for printing MAN pages # # Script name: prman # Script location: /usr/local/bin # Script permissions: chmod 775 prman # Script ownership: chown root:wheel prman # After installation, execute command: rehash # case $# in 1) man $1 | pr -h $1 -o 9 | lpr ;; 2) man $1 $2 | pr -h $2 -o 9 | lpr ;; *) echo "$0: Invalid argument count: $#" >&2 echo " " >&2 echo "Usage: $0 [section] name" >&2 echo " " >&2 ;; esac =========================== End Script ========================= DISCLAIMER I am not responsible in any manner for direct, indirect, special or consequential damages, howsoever caused, arising from the use of these scripts. USE AT YOUR OWN RISK By using these scripts, you agree to assume all risks and liabilities arising from such use. Harold