[comp.sys.hp] Big fun with nroff on a HP Laserjet II

demasi@paisano.UUCP (Michael C. De Masi) (03/01/88)

Hello poeple,

I've been trying to write an 'nterm' printer descriptor
file for an HP Laserjet II for some time now, and just
when I thought I had it perfected, I find that there is
no real reverse line feed (or relative cursor up) sequence
that can be understood by the printer.

If I'm wrong, blame it on HP tech support, cause they're
the ones who gave me this info.  If not, it really seems
like a rather silly thing to leave out of such a nice printer.
Anyway, has anybody come up with a workaround for this
short of preparing the files for just a general 'lp'
description?  Is there a reverse line feed/cursor up
sequence that nobody knows about?  Does anybody have
an 'nterm' file already written that they'd just love
to send me?  Huh?

Any responses would be appreciated in the extreme and
should be mailed directly as I do not always get to read
these groups.

Thanks in advance,
Michael C. De Masi - AT&T Communications (For whom I work and not speak)
2340 Dulles Corner Blvd.  Herndon, Virginia 22071   Phone: 703-834-8123
UUCP:   decuac!grebyn!paisano!demasi
     "All things considered, I'd rather be in Philadelphia" - W C Fields

kg@elan.UUCP (Ken Greer) (03/02/88)

From article <333@paisano.UUCP>, by demasi@paisano.UUCP (Michael C. De Masi):
> I've been trying to write an 'nterm' printer descriptor
> file for an HP Laserjet II ... I find that there is
> no real reverse line feed (or relative cursor up) sequence
> that can be understood by the printer.

Reverse line feed and half line reverse on the LJ are:

	flr     "\033&a-1R"
	hlr     "\033=\033&a-1R"
-- 
Ken Greer
Elan Computer Group, Inc.
415-322-2450 
{ames,hplabs}!elan!kg

neff@hpvcla.HP.COM (Dave Neff) (03/03/88)

I don't know who you talked to, but don't despair.  PCL does not have
a specific reverse line feed sequence, but the absolute cursor move sequence
can be used to place the cursor anywhere on the page and the relative
cursor move sequence can be used with negative values. Send an:

Esc&a-1R

to move the cursor up one row.  Hence this is equivalent to a reverse
line feed.  Sorry someone gave you the wrong data.  The LaserJet
printers are page oriented devices so of course you can randomly move
the cursor anywhere you want on the page anytime you want to.
The above sequence is called "vertical cursor positioning by rows".

Dave Neff
ihnp4!hpfcla!hpvcla!neff

cl@datlog.co.uk (Charles Lambert) (03/08/88)

In article <267@elan.UUCP> kg@elan.UUCP (Ken Greer) writes:
>
>Reverse line feed and half line reverse on the LJ are:
>
>	flr     "\033&a-1R"
>	hlr     "\033=\033&a-1R"

You can use fractional line movements as well, so

    hlr		"\033&a-.5R"

works fine;  we have it in our nterm description.  BTW,  if you use Ken's
control string,  be sure to write it exactly as he does;  if you do the
reverse-line first it fails at the top of a page.

-------------
Charles Lambert