Sending tray code to hp
Jean-Pierre A. Radley
appl at jpr.com
Tue Mar 2 14:27:50 PST 2010
John Sica propounded (on Tue, Mar 02, 2010 at 12:49:03PM -0700):
| I use the hp printer manager program to install the printer and choose
| the HPLaserjet model. I then copy the netcat script over script in
| ../interfaces that starts something like the small paste below.
| ======================
| #!/bin/sh
| YOUR_PRINTER_OR_IP="192.168.0.90"
| PORT=9100
| #
| # @(#) hpnp.model 62.2 97/03/03
| #
| ======================
| and contains these lines somewhere in the middle of the script
| =======================
| PERIPH=
| if [ "$PERIPH" = "" ]
| then
| PERIPH=$MODEL
| fi
| LOG=/tmp/$PERIPH.$$
| HPNPF=/usr/bin/netcat
| LPLOG=/tmp/hpnpf.$$
| LOGTRIES=5
|
| echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG
| ========================
| I assume this uses the model chosen which now resides in ../model.orig
|
| I started using netcat several years ago to solve problems that I
| couldn't fix by just removing and installing the same printer with the
| hp printer manager program.
|
| Netcat almost always works, except printing long files over the internet.
I dont a copy of that version of the script to see for myself, but
if you have some lines like these in that file:
# Set up printer default modes -- Assume PCL mode on entry
echo "\033E\c" # Reset Printer
echo "\033)0B\c" # Secondary character set line draw
echo "\033&k2G\c" # Set line termination mode.
Than add one more for tray selection:
echo "\033*l1H\c" # Set paper source from lower tray
N.B: I don't mean to modify the model script -- edit its copy in the
interfaces directory.
OTOH, read the script and see if it already contains an lb or lbin
option to do that tray selection; in that case, you could leave
the interface script alone, but define a printer in filePro which
incorporates that option.
--
JP
More information about the Filepro-list
mailing list