1846639 Members
1672 Online
110256 Solutions
New Discussion

Printing problems

 
SOLVED
Go to solution
ITeam
Super Advisor

Printing problems

We have just installed a new N-class server with HP/UX 11i installed. We have 10 serial dot matrix printers connected via a pci mux PN16 to the server. The printers have been setup with the dumb model script. The printers range from Newbury Data printers to Printronix printers. All of the printers print outs have like a stepping effect, there appears to be a LF but no CR. The server is an upgrade from a D-class and HP/UX 10.20 and all of the printers have been moved over from there. We are using the same model scripts and have even tried the scripts that the printers were using, on the D-class, on the N-class as well but with no difference. If we set the printers up using ESCP instead, the format of the print out is correct but the printers complain about the data being sent down to them. We are using the standard stty settings which are contained within the dumb model script.
Can anyone help me as I have so far spent many hours on this and I am getting nowhere very fast.

Many thanks, Graeme.
6 REPLIES 6
Leif Halvarsson_2
Honored Contributor

Re: Printing problems

In the interface script try uncomment the stty line and add "inlcr" to it (add CR to LF).

stty raw 9600 -parenb cs8 ixon -istrip clocal inlcr <&1 2>/dev/null #uncomment
Olav Baadsvik
Esteemed Contributor

Re: Printing problems


Hi,

Your problem is that the UNIX line-termination
is only LF.
Many printers can be configured to automatically
add a CR to every LF. Check if this is
possible on your printers. If not you will
have to modify the model-script so that
it does a ux2dos command to the file
before it cat it to the printer.

Regards
Olav
ITeam
Super Advisor

Re: Printing problems

Thanks for your reply Leif, I have already tried inlcr and onlcr with no change to the printout.
ITeam
Super Advisor

Re: Printing problems

Thanks Olav, I am digging out the printer manuals now to trawl through them and try to find if they support CR to NL options.
Olav Baadsvik
Esteemed Contributor
Solution

Re: Printing problems


HI,

Or you could modify the following lines
in the dumb-script:while [ $i -le $copies ]
do
for file in $files
do
cat "$file" 2>&1
echo "\014\c"
done
i=`expr $i + 1`
done

to be:

while [ $i -le $copies ]
do
for file in $files
do
cat "$file" | ux2dos 2>&1
echo "\014\c"
done
i=`expr $i + 1`
done

Regards
Olav

Rich Wright
Trusted Contributor

Re: Printing problems

I have used sed to do this.
eg.
cat $file | sed 's/\^J/\^J\^M/'

(use V to enter J, M.)