From: clewis@ferret.ocunix.on.ca (Chris Lewis)
Newsgroups: comp.periphs.printers
Subject: Re: HP Laserjets under Unix
Date: 21 Dec 92 02:45:25 GMT
Organization: Elegant Communications Inc., Ottawa, Canada

In article <1992Dec16.023951.26622@netcom.com> esprit@netcom.com (Alan F. Perry) writes:
>In article <1992Dec15.171046.8086@netcom.com> esprit@netcom.com (Alan F. Perry) writes:
>>I am trying to configure a variety of HP Laserjets under Unix (BSD-like).
>>The first thing that bit me was that apparently they can't be configured
>>to map LF to CR-LF and a filter must be used.  (Could someone please tell
>>HP that having this configureable on the printer is a good thing?)

>In response to this article I have received a bunch of e-mail telling
>me what Escape sequence to send to the printer in order to tell it to
>map LF to CR-LF.  Thanks for your help, but I did not ask for a command
>to put the printer in a special mode: I asked for a configuration option
>so that when I power my printer up it is in that mode.

>As it is, you have to have a filter, either to map the LF to CR-LF or a
>filter (or initialization string) to send the Escape sequence to insure
>that the printer is in the right mode.  Except for the HPs, most printers
>that I have used allows you to set a DIP switch to control LF mapping.
>Most printer makers seem to understand that this is a good feature for
>a printer.

This is what filters are for - setting the printer up for operation for
your system.  Generally, it's best to leave the printer with its defaults
(and its default is correct for the majority of HP's market - DOS machines),
and have the filter set things up completely for each job.  This gives
you the most flexibility.  If it were a config option, or, horrors, a DIP
switch, how would you go about changing it programmatically when you had
something to send to the printer that had both CR and LF?

Having the printer interface set things up *completely* per job is the best
idea - it's amazing how badly a printer can get screwed up once users start
diddling with it.

You should see the PCL print interfaces/filters that come with HP-UX.  The first
thing they do is send a reset code - to make sure that the last job hasn't
screwed everything up.  Then, by spooler options, you can select
all sorts of stuff.  Landscape, fonts, point sizes etc.  Each by escape
code.  You *don't* have to do the LF->CRLF mapping yourself, and you
shouldn't.

[The only thing wrong with HP-UX is that the filters don't force the printers
to 66 lines per page by default like every other UNIX utility in the planet
is expecting.]

The selectable escape approach is the best.  And the interface
should be intelligent enough to send the proper escape sequences to the printer
to have it in the mode you want - ie: the escape code for mapping LF to CRLF
*if* you need it for that particular job.  If you were to, for example, use
psroff (or other programs that download fonts or rasters) with your present
filter, your filter would bugger things up completely.  Ie: font downloads
and rasters can contain LFs and your filter will insert CRs into the middle
of fonts....

>>Now, I have things working well on a Laserjet II, but the same setup
>>doesn't work so well on a Laserjet IIIsi.  

>>What are the differences between the different Laserjet printers as far
>>as sending regular ASCII text files to them goes?

Almost nothing w.r.t. ASCII.  There's something wrong with the interface.
Is the IIIsi *really* parallel?  There may also be an inverted ack
in there somewhere.  On the other hand, it could be stuck in PostScript ...
-- 
Chris Lewis; clewis@ferret.ocunix.on.ca; Phone: Canada 613 832-0541
Psroff 3.0 info: psroff-request@ferret.ocunix.on.ca
Ferret list: ferret-request@ferret.ocunix.on.ca
Newsgroups: comp.periphs.printers