dvijep on sgi

DanKarron at UCBVAX.BERKELEY.EDU DanKarron at UCBVAX.BERKELEY.EDU
Sat May 11 16:15:14 AEST 1991


Here is the solution to the problem. I had the exact same difficulty.

The problem is actually that your lp script is clipping off the 8th bit when
dvijep downloads the soft font to your printer. The solution is to
use a raw stty for your printer. I append my lp interface script. Note
that I run at 38400 baud. That blasts output to a serial-parallel
buffer box. You will probably want to lower the baud rate to 9600. Be careful
of handshake. I had to make a special cable, as the laser jet
printers use DTR for character flow control that gets crossed to CTR for
sgi. I found that narrow font items were corrupted, and the font looked
generally sloppy with that 8th bit missing.

This interface script is for use with a removable Pacafic Data post script
cart that is so slow that I use it only for ps specials.

------------------------lp interface for HP LaserJet 2 printer-----------------
#!/bin/sh
ESC="\033"
CTL_D="\004"
PS_TO_PCL="${ESC}&l5257.1058J"
RESET="${ESC}E"
FFCRLFSTRING="${ESC}&k2G"
INITSTRING="${RESET}${FFCRLFSTRING}"
# no init while ps is working!
#INITSTRING="${RESET}${FFCRLFSTRING}"
#INITSTRING="${PS_TO_PCL}"
#INITSTRING="${RESET}${FFCRLFSTRING}"
LANDSCAPE="${ESC}&l1O"
HEADSTRING="${INITSTRING}"
EXITSTRING="${INITSTRING}"
BAUDRATE=38400
#BAUDRATE=19200
#BAUDRATE=9600
STTYPARAMS="raw cs8 -parenb"
#BANNER=1
#TRAILER="$BANNER"
printer=`basename $0`
LOGFILE=/usr/spool/lp/log
seqid=$1
name=$2
title="$3"
copies=$4
options="$5"

shift; shift; shift; shift; shift

files="$*"

#
# Parse printer-specific options specified with lp(1) -o option
#
#
# Initialize port parameters
#
stty $BAUDRATE $STTYPARAMS <&1
#cat < /dev/ttyf4 >> $LOGFILE &
#CPID=$!

echo >> $LOGFILE
stty -a <&1 2>&1 >> $LOGFILE
echo >> $LOGFILE

echo "`date` PRINT started\n\ttitle=\"$title\" file=\"$files\" options=\"$options\" " >> $LOGFILE
set -- $options
while test $# -ne 0
do
	case $1 in
		landscape|LANDSCAPE)
		echo $1 option selected >> $LOGFILE
SYMBOL_SET="${ESC}""(0N"
SPACING="${ESC}""(s1P"
PITCH="${ESC}""(s16.6H"
POINT="${ESC}""(s8.5V"
STYLE="${ESC}""(s0S"
STROKE="${ESC}""(s0B"
TYPEFACE="${ESC}""(s0T"
INITSTRING="${RESET}${FFCRLFSTRING}${LANDSCAPE}${SYMBOL_SET}${SPACING}${PITCH}${POINT}${STYLE}${STROKE}${TYPEFACE}"
			;;
		envelope|ENVELOPE)
			echo $1 option selected >> $LOGFILE
LETTER_ENV="${ESC}&l80A"
TOP_MARGIN="${ESC}&l20E"
PAGE_LENGTH="${ESC}&l100P"
TEXT_LENGTH="${ESC}&l100F"
LEFT_MARGIN="${ESC}&a25L"
RIGHT_MARGIN="${ESC}&a100M"
SYMBOL_SET="${ESC}(0U"
SPACING="${ESC}(s1P"
PITCH="${ESC}(s12H"
POINT="${ESC}(s12V"
STYLE="${ESC}(s0S"
STROKE="${ESC}(s3B"
TYPEFACE="${ESC}(s6T"

INITSTRING="${RESET}${FFCRLFSTRING}${LANDSCAPE}${TOP_MARGIN}${TEXT_LENGTH}${LEFT_MARGIN}${RIGHT_MARGIN}${PAGE_LENGTH}"
INITSTRING="${INITSTRING}${SYMBOL_SET}${SPACING}${PITCH}${POINT}${STYLE}${STROKE}${TYPEFACE}"
			;;
		notrailer)
			echo $1 option selected >> $LOGFILE
			TRAILER=0
			;;
		trailer|TRAILER)
			echo $1 option selected >> $LOGFILE
			TRAILER=1
			;;
		banner|BANNER)
			echo $1 option selected >> $LOGFILE
			BANNER=1
			;;
		nobanner)
			echo $1 option selected >> $LOGFILE
			BANNER=0
			;;
		raw|RAW)echo "$1 option selected" >> $LOGFILE
			HEADSTRING="$HEADSTRING""$FFCRLFSTRING"
			INITSTRING=""
			STTYPARAMS="raw -icanon -opost -xcase -isig istrip -ixany -brkint cread clocal cs8 -ixon"
			;;
		ps|PS)
			echo $1 option selected >> $LOGFILE
			INITSTRING=""
			;;
		tex|TEX)
			echo $1 option selected >> $LOGFILE
			;;
		*)	;;
	esac
	shift
done

if [ "$BANNER" ]
then
x="=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
X="$x\n$x\n$x\n$x\n\n"
echo "$HEADSTRING""\c"
echo $X


banner "$name"
echo "\n\n"
user=`grep "^$name:" /etc/passwd | line | cut -d: -f5`

	if [ "$user" = "" ]
	then
	user=`(ypmatch $name passwd | line | cut -d: -f5) 2> /dev/null`
	fi

	if [ -n "$user" ]
	then
	echo "User: $user\n"
	else
	echo "\n"
	fi

echo "Request id: $seqid    Printer: `basename $0`\n"

date

echo "\n"
echo $X

	if [ -z "$title" ]
	then
	title="STD_IN"
	fi

echo "\n""$title""\n"
banner `echo "$title" | cut -c1-10`
echo "\n""$title""\n"
echo $X
echo "\014\c"
else
echo NO BANNER >> $LOGFILE
fi

if [ -z "$INITSTRING" ]
then
echo "NO INIT" >> $LOGFILE
else
#echo "${PS_TO_PCL}""\c"
#sleep 3
echo INITSTRING=`echo $INITSTRING | od -c|cut -c8-` >> $LOGFILE
echo "$INITSTRING""\c"
fi

i=1
while [ $i -le $copies ]
do
	for file in $files
	do
	cat "$file" 2>&1
	echo "\014\c"
	done
	i=`expr $i + 1`
done

	if [ "$TRAILER" ]
	then
	echo "$HEADSTRING""\c"
	echo $X
	banner $name
	echo $X
	echo "\n""$title""\n"
	banner `echo "$title" | cut -c1-10`
	echo "\n""$title""\n"
	echo $X
	banner COMPLETED
	echo $X
	echo "\014\c"
	echo "$EXITSTRING""\c"
	fi

echo "`date` PRINTING Completed" >> $LOGFILE
#kill -9 $CPID
exit 0
--------------------------------------------------------------------------------
>From info-iris-request at vmb.brl.mil  Fri May 10 21:20:13 1991
>Received: from acf4.nyu.edu by karron.med.nyu.edu (5.52/890607.SGI.DBK2)
>	(for karron) id AA17744; Fri, 10 May 91 21:20:13 EDT
>Received: from NYU.EDU by acf4.NYU.EDU (5.61/1.34)
>	id AA03970; Fri, 10 May 91 21:14:22 -0400
>Received: from vmb.brl.mil by cmcl2.NYU.EDU (5.61/1.34)
>	id AA19694; Fri, 10 May 91 21:14:19 -0400
>Received: from vmb.brl.mil by VMB.BRL.MIL id aa05877; 10 May 91 20:10 EDT
>Received: from vgr.brl.mil by VMB.BRL.MIL id aa05830; 10 May 91 19:54 EDT
>Received: from ucbvax.Berkeley.EDU by VGR.BRL.MIL id aa26304;
>          10 May 91 19:52 EDT
>Received: by ucbvax.Berkeley.EDU (5.63/1.42)
>	id AA27109; Fri, 10 May 91 16:45:24 -0700
>Received: from USENET by ucbvax.Berkeley.EDU with netnews
>	for info-iris at brl.mil (info-iris at brl.mil)
>	(contact usenet at ucbvax.Berkeley.EDU if you have questions)
>Date: 9 May 91 02:39:43 GMT
>From: "T.C. Zhao" <bloom-beacon.mit.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!menudo.uh.edu!svec5>
>Organization: University of Houston
>Subject: dvijep on sgi
>Message-Id: <1991May9.023943.15069 at menudo.uh.edu>
>Sender: info-iris-request at BRL.MIL
>To: info-iris at BRL.MIL
>
>I am having some trouble isolating problems with dvijep on an SGI.
>Specifically, when 11pt fonts are used, the print out will miss i(Roman)
>verywhere.  I got dvijep compiled without any warning and 10pt document
>seems ok. The 300dpi 11pt preview rules out problems with the font
>itself.
>I am really lost here. Any help will be greatly appreciated.
>System: SGI 4D/210GTX running 3.3 with HP LaserJet series II.
>
>Thanks in advance.
>
| karron at nyu.edu (e-mail alias )         Dan Karron, Research Associate      |
| Phone: 212 263 5210 Fax: 212 263 7190  New York University Medical Center  |
| 560 First Avenue                       Digital Pager <1> (212) 397 9330    |
| New York, New York 10016               <2> 10896   <3> <your-number-here>  |



More information about the Comp.sys.sgi mailing list