Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 May 1995 08:17:38 -0400 (EDT)
From:      John Matzner <john@kiawah.atinc.com>
To:        Robert Burns <procecorjb@Vir.com>
Cc:        questions@FreeBSD.org
Subject:   Re: deskjet not working
Message-ID:  <Pine.BSD.3.90.950504080437.574D-100000@kiawah>
In-Reply-To: <199505040417.XAA20000@Vir.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Wed, 3 May 1995, Robert Burns wrote:

> when i send a file to my deskjet  ( ex. " lpr /etc/hosts" )
> I get nothing but form feeds and some text ( t's,r's and o's)
> 
> At boot up everything looks right:
> 
> lpto:at 0x378 0x37f on irq 7 isa
> lpto:interrupt driven port
> 
> And my /etc/printcap file is set up as:
> 
> #@(#)printcap 5.3 (Berkeley) 6/30/90
> lp|local line printer:\
> :lp=/dev/lpt0:sd=/var/spool/lpd:lf=/var/log/lpd-errs:
> 
> What could be the problem?


You need to set up a simple filter program, designated 
via the  :if=/some/path/shellscript  option of
printcap which sends an escape sequence to the deskjet, changing
the way it thinks about CR's and LF's. The one I cobbled together convinces 
the deskjet to look like a simple ascii printer.



#!/bin/sh
echo "^[&k2G"
cat
exit


Look at the docs that come with the lpr daemon source and
also the lpr man pages.  The exit line above is vital.  Also look at
the deskjet's printer escapes - you should find that the 
ESC & k 2 G sequence convinces the deskjet to change its interpretation
of LF's and CR's.   If you really want great things from the deskjet, 
you might want to install ghostscript.  Some earlier posts to this list
covered this.


Good luck,

	John



---------------------------
john@kiawah.atinc.com
john@aati.com





Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?Pine.BSD.3.90.950504080437.574D-100000>