[Q] Printing with JetDirect Card

From: Nicci Roth <nicci_at_ny.ox.com>
Date: Thu, 12 Sep 96 11:25:49 -0400

OS: DU 3.2C
Print Setup: use sh scripts to print directly to JetDirect Card

Hi all,

I recently (2 days ago) moved from spooling to one of my last 2 remaining
Ultrix machines for printing to having all machines on my network print
directly to the JetDirect card. This work - no problems here.

However, the printcap file on the Ultrix station had the following lines
in it:
        :of=/usr/lib/lpdfilters/ln03rof | netcat1:\
        :ps=LN03R:\
        :Dl=/usr/local/lib/lpdfilters/lps_v3_hplj4.a:\
        :Lf=/usr/lib/lpdfilters/layup:\
        :Xf=/usr/lib/lpdfilters/xlator_call:

What this seems to do is a few things, one is print a very nice looking
header page and another is that it permits our printers to print in duplex.

Is there anyway I can make my new printing set up on DU 3.2C do these things?
The script that runs now to print seems to override all lpr commands
(i.e., K 2 or N 2). As of right now, the header pages are standard-type (I
can live with this) but I cannot print duplex - this, I need to do.


Here's what my printcap looks like:

hplj4si1|lp|lp1|lj4|bof:\
        :lf=/usr/adm/lperr:\
        :lp=/dev/null:\
        :mx#0:\
        :of=/usr/spool/lpd/lj4/hplj.of.sh:\
        :sd=/usr/spool/lpd/lj4:\
hplj4si2|lp2|lj5|trade:\
        :lf=/usr/adm/lperr:\
        :lp=/dev/null:\
        :mx#0:\
        :of=/usr/spool/lpd/lj5/hplj.of.sh:\
        :sd=/usr/spool/lpd/lj5:

and here's what the script (hplj.of.sh) looks like:

#!/bin/sh
#
# Output filter script to print to a JetDirectEX box which has a LaserJet4MP
# connected to it - for Postscript & Raw ascii files
#
# Set the PATH variable so it can find the software you compiled
#
PATH="/usr/var/spool/hpfilters/srcspool:$PATH"

#
# This sets up internal variables
#
SCAN=/usr/var/spool/hpfilters/srcspool/hpnps
TMPFILE=".out.$$"

#
# Remove the last 'temp' file
#
trap "rm -f $TMPFILE; exit 0;" 2

#
# This runs the 'SCAN' program which just determines whether the file is
# Postscript or Ascii - It reads from standard input the file been printed
# and then puts the file to be printed into a unique temp file - this allows
# more than one print job to occur
#
$SCAN > $TMPFILE
PERS=$?
if [ "$PERS" -eq 1 ]
then
        #
        # Here we print Postscript (ie: -P)
        #
        # OTA cat $TMPFILE | hpnpf -P -x JetDirect1 -p 9100 -s status > /dev/nul
l
        cat $TMPFILE | hpnpf -P -x hplj4si1 -p 9100 -s status > /dev/null
        rm -f $TMPFILE
else
        #
        # Here we print Ascii
        #
        # OTA cat $TMPFILE | hpnpf -n -x JetDirect1 -p 9100 -s status > /dev/nul
l
        cat $TMPFILE | hpnpf -n -x hplj4si1 -p 9100 -s status > /dev/null
        rm -f $TMPFILE
fi

exit $?

Any suggestions will be most apprecaited.

Thanks, I will summarize.

Nicci


************************************************************************
Nicci Roth * Only two things are *
OTA LP * infinite, the * ____ _____ __
phone: 914/694 5800 * universe and human * | | | / \
fax: 914/694 5831 * stupidity, and I'm not* | | | /----\
email: nicci_at_ox.com * sure about the former * |____| | / \
                        * -Albert Einstein *
*************************************************************************
        opinions expressed do not represent those of my employer
Received on Thu Sep 12 1996 - 18:06:56 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:47 NZDT