Gidday and Thanks to the list 5 replies in 5 minutes, and to Selcuk Karaca,
Allan Simeone & Chris Ruhnke who provided one of the solutions that worked
and to Patrick Powell for the one I will use.
There were two solutions that worked for me. The original question is at the
end;
The first was that the LA120 does indeed have a setting to convert LF to
CRLF it was buried under a non de plume in the middle of the manual under a
heading of Communication. Simply put, press and hold the SETUP key. Press
the W key multiple times until the LED displays the number 2 (New line =
LF). While still holding the SETUP key press the SHIFT and 9 keys to store
the settings.
The second solution was to use LPRng.
By using the following format for the printcap entry the staircasing went
away independent of the LA120 settings;
lp7| Network printer on Network Print Server p-hind7:
:server <- for server only
:filter=/usr/local/libexec/filters/lpf <- comes with LPRng
:sd=/var/spool/lpd/lp7:
:lf=/var/spool/lpd/lp7/log:
:lp=pr3_at_p-hind7
:lpd_bounce <- forces the server to filter file.
As we are introducing LPRng to resolve a different problem, this is the
solution that I will be implementing.
The other solutions I received follow;
Ruth Belin suggested I try to use tr to modify the file before sending to
the printer. Great idea. I tried this but was totally unsuccessful.
Hoai Tran, Joe Fletcher suggested using :rp=text:\ in the printcap entry.
Unfortunately the printserver port needs to be addressed using the :rp entry
so this was not an option.
Jim Smart suggested using remote telnet to print to the printserver. In
house this has already been used but seems to have an annoying habit of
going to sleep every so often. Since this printing requirement is high
availability, I didn't consider this option.
Selcuk Karaca, Allan Simeone & Chris Ruhnke suggested checking the printer
settings for an option to manage the CRLF/LF problem
My Compaq friend Toby Shallas suggested four different options including
three of those above and additionally LPRng. I have looked into this as we
are using both Normal LPR/LPD as well as LPRng.
Ernie LaBonte and Alan Davis suggested using the generic_ansi printer setup
to resolve the problem. I tried this but to no avail.
Paul Roetman suggested a print filter or creating a shell script to
preprocess the file. I don't have time to try out this particular approach
but it looks interesting.
Tom Devine reminded me to test the system elsewhere. This I have done. The
printer comes from a DEC terminal server/VMS environment where it works
fine. Going to the Printserver/Unix environment is where the problem has
arisen.
Cy Dewhurst provided me with a prefilter which he suggested may solve the
problem, I include it here for others benefit;
#include <stdio.h>
void main ()
{
int ch;
/* Print all stdin */
while ((ch = getchar()) != EOF)
{
putchar(ch);
/* LF = CR + LF */
if (ch == '\n')
{
putchar('\r');
putchar('\n');
}
}
}
Compile with:
cc afilter.c -o afilter
Test with:
cat yourfile | afilter | lpr -Pyourprinter -h
This solved the staircase but introduced double line spacing. Maybe just
needs a little tweeking. ;-)
-----Original Message-----
From: Blom, Wayne
Sent: Tuesday, August 08, 2000 3:49 PM
To: True64 Unix Managers (E-mail)
Subject: Printing to serial printer via printserver doing the staircase
Gidday all,
I have been trying to resolve the issue where the line printer (Ancient DEC
LA120) connected via serial port to a print server delivers the familiar
stair case. I know, I know, upgrade to a fast Laser or genicom. We are, but,
budgets are tight and these things are everywhere.
Simply put the printer is only doing linefeed where I require that it do a
carriage-return/linefeed.
I have scanned the archives, I have tried the man pages, I have tried the
standard print filters but have not been able to determine how to translate
the linefeeds into carriage-return/linefeeds.
Any help would be greatly appreciated.
Thanks
Wayne Blom
System Specialist
Technical Development Healthcare
F H Faulding & Co Limited
Ground Floor
1 Station St
Hindmarsh SA 5007
Ph: +61 8 8241 8334
FAX: +61 8 8241 8357
Mobile: +61 0419 808 496
Email: wayne.blom_at_au.faulding.com
Received on Wed Aug 09 2000 - 01:04:34 NZST