Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!pcrat!rick From: rick@pcrat.uucp (Rick Richardson) Newsgroups: comp.unix.i386 Subject: Re: HP Laserjet II on ISC 2.02, need help Summary: Here's an lp model that works Keywords: HP Laserjet Message-ID: <1989Sep10.120752.13203@pcrat.uucp> Date: 10 Sep 89 12:07:52 GMT References: <1683@lamont.ldgo.columbia.edu> Reply-To: rick@pcrat.UUCP (Rick Richardson) Organization: PC Research, Inc., Tinton Falls, NJ Lines: 168 In article <1683@lamont.ldgo.columbia.edu> fritzz@lamont.ldgo.columbia.edu (fritz zaucker) writes: >I need some help to get a HP Laserjet II running under Interactive >ix/386 version 2.0.2 >I tried to install it with the SYSADM script for setting up a printer. >The menu offers a "hplaser" option. Here is our lp filter that comes with JetRoff 2.6 and Uni/JetFax 1.0 for use with the HP LaserJets. It supports a few bells and whistles for unformatted text. -Rick Richardson PC Research, Inc. #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # hplaser-par # This archive created: Sun Sep 10 07:53:53 1989 export PATH; PATH=/bin:/usr/bin:$PATH if test -f 'hplaser-par' then echo shar: "will not over-write existing file 'hplaser-par'" else sed 's/^X//' << \SHAR_EOF > 'hplaser-par' X# hplaser: lp model interface for HP LaserJet Series II X# X# command arguments are: X# request-id user-name title copies printer-options file1 [file2 ...] X# $1 $2 $3 $4 $5 X# X# options are: X# -otroff #No cr/lf mapping (for JetRoff, etc.) X# -oland #Landscape orientation for unformatted text X# -o2on1 #Two pages on one page for unformatted text X# -oi #Indent 8 characters for unformatted text X# -o17cpi #17 CPI for unformatted text X# X# Configuration: Xspeed=19200 #Serial interface speed (19.2) Xspeed= #Parallel interface leave blank Xbanner=0 #Enable printing of banner page Xpicture=0 #Enable printing of $HOME/.mugshot on banner page X #.mugshot is any PCL, typically a scanned picture of the user X# X# Xnoraw="\033&k2G" Xraw="\033&k0G" Xif [ "$speed" != "" ] Xthen X stty $speed clocal cs8 ixon ixoff -ixany -parenb onlcr -tabs -opost <&1 Xfi X# character sequence to initialize printer before printing XSET="" X# character sequence to reset printer after printing done XRESET="\033E" X# X# First, get printer banner page out in portrait, courier X# Xif [ $banner = 1 ] Xthen X PCOURIER= #"\033&l66p2e7.6c66F" X GRAY="\033*c2400a150b30g2P" X TLOC="\033*p0x0Y" X echo "$RESET$noraw$PCOURIER$TLOC$GRAY\n\n\n\n" X banner " $2" X echo "\n" X user=`grep "^$2:" /etc/passwd | line | cut -d: -f5` X if [ -n "$user" ] X then X echo " User: $user\n" X else X echo "\n" X fi X echo " Request id: $1 Printer: `basename $0`\n" X echo " Options: $5\n" X echo " `date`" X echo "\n" X if [ -n "$3" ] X then X banner $3 X fi X if [ $picture = 1 ] X then X home=`grep "^$2:" /etc/passwd | line | cut -d: -f6` X if [ -f "$home/.mugshot" ] X then X echo "$raw\c" X echo " \c" X cat $home/.mugshot X echo "$noraw\c" X fi X fi X echo "\014\c" Xelse X echo "$RESET\c" Xfi X# X# Now process user options X# Xtrap 'echo $RESET\\c; exit' 0 2 3 15 Xcopies=$4 Xopts=$5 Xshift 5 Xfiles="$*" Xtwo_on_one=0 Xi=1 Xifraw="$noraw" Xfor o in $opts Xdo X case $o in X troff) X SET="$SET\033E" X ifraw="$raw" X ;; X land) X # &l1O - landscape orientation X # (s16.66H - primary font pitch X # &l5.4 - vert motion index 48ths/in X # &l6E - Top margin X # &l66F - text length X SET="$SET\033&l1O\033(s16.66H\033&l5.4C\033&l6E\033&a0R\033&l66F" X ;; X 17cpi) X # (s16.66H - primary font pitch X # &l5.4 - vert motion index 48ths/in X # &l6E - Top margin X # &l66F - text length X SET="$SET\033(s16.66H" X ;; X i) # indent 8 characters X SET="$SET\033&a8L" X ;; X 2on1) X SET="$SET\033&l1O\033(s16.66H\033&l5.4C\033&l6E\033&a0R\033&l66F" X two_on_one=1; X ;; X esac Xdone Xwhile [ $i -le $copies ] Xdo X for file in $files X do X echo "$SET$ifraw\c" X if [ $two_on_one = 1 ] X then X cat "$file" | newform -i | \ X sed "s/^/| /" | pr -2 -w175 -t X echo "$RESET\c" X else X cat "$file" 2>&1 X echo "$RESET\c" X fi X done X i=`expr $i + 1` Xdone Xexit 0 SHAR_EOF fi exit 0 # End of shell archive -- Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor| Ask about PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:| Uni/JetFax uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/. | for UNIX/386 jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp