Summary #2: 11x17 printing

From: Pat Hooper (phooper@nebs.com)
Date: Mon May 15 2000 - 07:19:38 CDT


I had mentioned a script from Matt Reynolds that would handle 11x17
printing on various printers but I did not include it in my initial
summary. Here it is.

#!/bin/sh
#this script processes the laserprinter option (-l) and cats multiple
files
#to lp .
file=$$
if [ -z "$1" ]
then
    echo ""
    echo "usage : lps [-2abcefghrlmnopstN] file1 file2 etc. ( wildcards
ok) "
    echo " -a prints in 166 x 60 mode (landscape)"
    echo " -b prints in 132 x 60 mode (landscape)"
    echo " -c prints in data mode (132 x 66)(portrait)"
    echo " -d prints 2 pages up in landscape mode (NOT ON IIIsi!)"
    echo " -e prints to the HP Color Laserjet (colorj) in the
South Bridge"
    echo " -f prints to the HP 4p at the front desk"
    echo " -g prints to the HP 5mp (lttrhead-postscript only!)"
    echo " -h prints to the LaserJet IIIsi (comprm)"
# echo " -i prints to the LaserJet IIIsi with the IBM-PC
character set"
# echo " -j prints to the LaserJet IIIsi with 2 80x66 pg/sheet
(landscape)"
# echo " -k prints to the LaserJet IIIsi with 4 80x66 pg/sheet
(portrait)"
    echo " -l prints to the LaserJet 4mp (nbridge) "
    echo " -m prints to the HP 4mp downstairs (1stflr)"
    echo " -n prints to the HP IVSI (south4si), south suite"
    echo " -o prints to the HP 4mv printer (tabloid)"
    echo " -p prints to the Calcomp 1023 plotter (1023pltr)"
# echo " -q prints to the Calcomp Designmate plotter
(dsgnpltr)"
# echo " -r prints at Raychem on a HP Deskjet"
    echo " -u prints to the PaintJet XL300 (paintjet) in
postscript mode"
    echo " -2 causes the IVsi and IIIsi to print on both sides of
the paper"
    echo " -tN defines the tabsize, where N is a number (1-9)."
    echo ""
    exit
fi
set -- `getopt abcdefghlmnopu2t: $*`
dest="-dIIIsi"
drive=""
tabsize="0"
dup=""
set1=""
set2=""
set3=""
set4=""
dest=""
set5=""
for i in $*
do
    case $i in
    -a) set1="\033&l1O\c"; set2="\033&l8D\c"; set3="\033&k2S\c"; shift;;
    -b) set1="\033&l1O\c"; set2="\033&l8D\c"; set3="\033(s13H\c";
shift;;
    -c) set1="\033&k2S\c"; shift;;
    -d) set5="up"; shift;;
    -2) set4="\033&l1S\c"; shift;;
    -e) dest="-dhpcj_1" ; shift;;
    -f) dest="-drecp" ; set1=""; set2=""; set3=""; set4=""; shift;;
    -g) dest="-dmps1b" ; set1=""; set2=""; set3=""; set4=""; shift;;
    -h) dest="-dIIIsi_1"; shift;;
# -i) dest="-dhppcl -ocs10U" ; shift;;
# -j) dest="-dhppcl -o2" ; shift;;
# -k) dest="-dhppcl -o4" ; shift;;
    -l) dest="-dn4mp_1" ; shift;;
    -m) dest="-d1stflr_1" ; shift;;
    -n) dest="-divsi_1" ; shift;;
    -o) dest="-dhp4mv_1" ; shift;;
    -p) dest="-dcalcomp" ; set1=""; set2=""; set3=""; set4=""; shift;;
# -q) dest="-ddesign" ; set1=""; set2=""; set3=""; set4=""; shift;;
# -r) dest="-dmp" ; shift;;
    -u) dest="-djetd1_1" ; set1=""; set2=""; set3=""; set4=""; shift;;
    -t) tabsize=$2; shift 2;;
    --) shift; break;;
    esac
done
echo "$set1\c" > /tmp/$file
echo "$set2\c" >>/tmp/$file
echo "$set3\c" >> /tmp/$file
echo "$set4\c" >> /tmp/$file
if [ "$set5" ]
then
        if [ $dest != "-dIIIsi_1" ]
                then
                cat $* | rsh antero '/usr/openwin/bin/mp -l -s '"$*"' |
lp '"$dest"''
        else
                echo "2 up won't print on the IIIsi"
        fi
else
        cat $* >>/tmp/$file
        cat /tmp/$file | rsh antero lp $dest
fi
rm /tmp/$file



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:08 CDT