Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OSR50x: Terminfo entry for epson printers?

39 views
Skip to first unread message

Ian Wilson

unread,
Jan 5, 2004, 10:56:38 AM1/5/04
to
I have a question about printer support in OSR507 (and earlier 5.0.x):

SIMPLE VERSION

How do I define a new terminfo entry for a printer such that it shows up
in the list at
"scoadmin printer" -> Settings -> Advanced -> Terminfo Type.
and what are the minimum attributes/capabilities to be defined?


VERBOSE VERSION

First some background, I have a local printer attached to a parallel
port, it is an Epson FX-2180 dot-matrix impact printer used for printing
5-part forms.

The main application knows the printer is an Epson and, when printing,
embeds the appropriate ESC/P control codes in the file before invoking
"lp". The application switches from 6lpi to 8lpi for some reports and
inserts the appropriate number of (narrower) blank lines between pages
for pagination.

The "standard" and "epson" printer models also try to insert formfeeds
or blank lines to reach the top-of-page after each file and at the end
of the whole job. However these models are not aware of the embedded 8
lpi codes and so get the line count wrong thus adding linefeeds that
position the start of the next print job in the middle of a sheet.

These models invoke /usr/spool/lp/bin/lp.pager to add blank lines if the
terminfo type is "unknown" for this printer. This terminfo type is the
default.

lp.pager would do the right thing if we could pass it a pagesize of "1"
(line), but lp wont accept "-o length=n" since the terminfo type is
"unknown". And anyway the "length" option is inches not lines.

There isn't a terminfo type for ESC/P (or "epson") and selecting any
other causes the printer model to emit unhelpful initialisation control
codes.

The obvious workaround is to make a custom interface model and use that.
I've done that.

However, it seems to me that defining an "epson" terminfo entry for
ESC/P printers might be more versatile and fit in better with the
overall philosophy of the OSR print system? Then the app could invoke
"lp -o lpi=8" etc. Both the app's output and commands like "lp
/etc/hosts" would get paginated correctly.

Its a puzzle to me why there's terminfo entries for dozens of ATTxxx
printers (obscure ones to me) but no terminfo entry for the popular
ESC/P or ESC/P2 standards supported by many manufacturers.

Roger Cornelius

unread,
Jan 5, 2004, 1:39:23 PM1/5/04
to
Ian Wilson wrote:
>
> I have a question about printer support in OSR507 (and earlier 5.0.x):
>
> SIMPLE VERSION
>
> How do I define a new terminfo entry for a printer such that it shows up
> in the list at
> "scoadmin printer" -> Settings -> Advanced -> Terminfo Type.
> and what are the minimum attributes/capabilities to be defined?

The scoadmin printer Terminfo Type pick window is populated at run time
from /usr/lib/terminfo/terminfo.lp, so you need to add your entry there
for it to appear in the list. You can also use lpadmin to set a
printer's terminfo type. See the article referenced below.


Try reading this old article:

http://groups.google.com/groups?selm=9701282251.aa02290%40sherpa.UUCP
--
Roger Cornelius rac...@tenzing.org

Ian Wilson

unread,
Jan 6, 2004, 5:12:49 AM1/6/04
to
Roger Cornelius wrote:
> Ian Wilson wrote:
>
>>I have a question about printer support in OSR507 (and earlier 5.0.x):
>>
>>SIMPLE VERSION
>>
>>How do I define a new terminfo entry for a printer such that it shows up
>>in the list at
>>"scoadmin printer" -> Settings -> Advanced -> Terminfo Type.
>>and what are the minimum attributes/capabilities to be defined?
>
>
> The scoadmin printer Terminfo Type pick window is populated at run time
> from /usr/lib/terminfo/terminfo.lp, so you need to add your entry there
> for it to appear in the list. You can also use lpadmin to set a
> printer's terminfo type. See the article referenced below.

<snip>

Thanks Roger. V useful.

As an aside: Google reveals that this issue comes up every year - not
sure if it qualifies as a FAQ. I also found the following terminfo
entries which I plan to try out ... just before everything gets swept
aside by CUPS in OSRLegend :-)

(quoted here in the hope it helps future googlers with similar problem*)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
# From: Oliver Okrongli (oli...@infix.de)
# Subject: Re: terminfo entry for epson FX100+ needed
# Newsgroups: comp.unix.sys5.r4, comp.sys.ncr
# Date: 1994-06-01 12:22:17 PST
#
# >>>>> Michael Nolan <no...@helios.unl.edu> writes:
# > A friend running on an AT&T GIS (NCR) 3000 unix box needs a terminfo
# > entry for a printer emulating an Epson FX100+. [...]
# > Does anybody have one pre-built that they can send me the source on?
#
# This is one we developed internally. Please don't expect any warranty
# or support. Anyway, this might be useful for you.
#
i_epsonfx|Epson FX series,
am,
msgr,
lines#72, orhi#60, orvi#216, orc#6, orl#36, widcs#12,
maddr#32767, mjump#127,
it#8, bufsz#8192,
is2=\E@,
# 15 cpi not supported -> translating to 17 cpi

cpi=%?%p1%{10}%=%t\EP^R%e%p1%{12}%=%t\EM^R%e%p1%{15}%=%t\EP^O%e%p1%{17}%=%t\EP^
O%e%p1%{20}%=%t\EM^O%;,
lpi=%?%p1%{128}%<%t\E3%{216}%p1%/%c%;,
slines=\EC%p1%c,
smglp=%?%p1%{0}%=%t^Q%e\El%p1%c%;,
smgrp=\EQ%p1%{1}%+%c,
ht=\t, cr=\r, cud1=\n,
ff=\f,
# u0 = enter double heigth mode, u1 = exit double heigth mode
ssupm=\ES\200, rsupm=\ET, ssubm=\ES\001, rsubm=\ET, sshm=\EG, rshm=\EH,
sitm=\E4, ritm=\E5, swidm=\EW\001, rwidm=\EW\200,
smul=\E-\001, rmul=\E-\200, u0=\Ew\001, u1=\Ew\200, bold=\EE,
sgr0=\E5\E-\200\EH\ET\EW\200\Ew\200\EF,
scs=%?%p1%{0}%=%t\Ex\200%e\Ex\001\Ek%p1%{1}%-%c%;,
csnm=%?%p1%{0}%=%tDraft%e%p1%{1}%=%tRoman%e%p1%{2}%=%tSansSerif%;,
snrmq=\Ex\200, snlq=\Ex\001, sdrfq=\Ex\200,

i_fx80|Epson FX-80 dot matrix printer,
cols#80,
use=i_epsonfx,

i_fx100|Epson FX-100 dot matrix printer,
cols#132,
use=i_epsonfx,
# --
# Oliver Okrongli infix Software-Systeme GmbH Phone +49 531 238090
# Rebenring 33 Fax +49 531 2380935
# oli...@infix.de 38106 Braunschweig F.R. Germany
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
#From: Jim McKim (mc...@falcon.lerc.nasa.gov)
#Subject: Re: Terminfo entry for Epson FX-85?
#Newsgroups: comp.unix.i386
#Date: 1990-03-20 16:31:01 PST
#
#Sorry about this - my email keeps bouncing back.
#
#Epson FX-80 terminfo entry:
#
fx80|fx-80|epson fx-80,
hc, os,
bufsz#2048, cols#80, cps#160, it#8, lines#66,
npins#9, orc#6, orhi#60, orl#9, orvi#36,
bel=^G, cr=\r, cud1=\n, ff=\f, ht=\t, is2=\E@,
lpi=\E%p1%c, rwidm=\EW0, scs=\E!%p1%c, smglp=\El%p1%c,
smgrp=\EQ%p1%c, swidm=\EW1,
#
#--
#----------------
#Jim McKim / Internet: mc...@falcon.lerc.nasa.gov be
#Phone: +1 216 891 2982 / Packet: kb8...@kb8dcr.ampr.org seeing
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

--
Ian Wilson
* Note to self: Must check netiquette on this.

0 new messages