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

line printer emulation

2 views
Skip to first unread message

Lacombe Serge

unread,
Jul 27, 1993, 5:27:22 PM7/27/93
to

Hi,

We have a lot of ascii print files created by cobol programs on a Unix
server. These files contains control characters (ff, cr,lf). We want
to emulate a line printer. Is there a utility that would allow us to
define the format of a page:

- paper orientation (landscape or portrait)
- number of lines/page.
- number of characters/line.


Thanks,
Serge Lacombe,
Universite de montreal

internet: la...@eole.ere.umontreal.ca

Brian Katzung

unread,
Jul 28, 1993, 9:58:22 AM7/28/93
to
Lacombe Serge writes

> We have a lot of ascii print files created by cobol programs on a Unix
> server. These files contains control characters (ff, cr,lf). We want
> to emulate a line printer. Is there a utility that would allow us to
> define the format of a page:
>
> - paper orientation (landscape or portrait)
> - number of lines/page.
> - number of characters/line.

I wrote a program to do this. It treats line-feeds as new-lines (there
is an implied carriage return), but this behavior should not be hard to
defeat if you need true line-feed functionality (that should probably be
an option).

Features:
- BS, TAB, NL, FF, CR interpretation (BS and TAB work even for
proportional fonts)

- Set paper size and margins in units of points, inches, centimeters,
or millimeters; paper size can also be set by name (eg, letter, a4)

- Page orientation may be landscape or portrait (the psutils program
pstops may be used to transform into seascape if desired)

- User may specify type face, point size, vertical spacing, lines per
page, and characters per line

It does not support:
- Page headers (use pr), line numbering (use cat -n), line folding
(use fold), N-up printing (use psnup), etc.

- "ASCII bolding" (offset backspace for a crude bold effect)

- Alternate character set encodings (yet)

Send me mail if interested.

-- Brian Katzung

0 new messages