1753702 Members
4836 Online
108799 Solutions
New Discussion юеВ

Printer Line Termination

 
TMcB
Super Advisor

Printer Line Termination

Hello
I'm trying to setup a non-HP wireless printer on a HPUX 10.20 server.

The prints are coming out, but in a "staircase" effect.

I believe I may have to send an escape sequence, and from the HP web site, I think it should be Esc&k3G.

Can anyone advise me on how I get the print queue to use this escape sequence.

Much appreciated!
5 REPLIES 5
Mark Grant
Honored Contributor

Re: Printer Line Termination

This is one way to do it though there may be a simpler way.Edit the script in /var/spool/lp/interface that matches the name of the printer. In there, near the bottom you will find a section that actually send stuff to the printer. Add an echo command to send the characters you need.
If you use "vi" to edit the script, you need to do CTRL V and then ESC in order to get the ESC character in there.There may be a more modern way to achieve this but I am still living in the good old dark ages :)
Never preceed any demonstration with anything more predictive than "watch this"
TMcB
Super Advisor

Re: Printer Line Termination

thanks for the reply

should I add it to the following line :

/usr/sbin/rlp -I$requestid $BSDC $BSDJ $BSDT $BSDi $BSD1 $BSD2 $BSD3 $BSD4 $BSDw $BSDformat $BSDh $1
Mark Grant
Honored Contributor

Re: Printer Line Termination

It depends.If the printer appears to the OS as a remote printer, which from your comment it appears to, it gets a little more unpleasant. You are going to have to do something odd with the file pointed to by $1 like copy it and add the escape sequence and though this would work it is a bit messy. You could try creating a file somewhere which contains the escape sequence and in the interface script add another "rlp" line before the proper one that looks similar but instead of the $1 has your file with the escape sequence. The only reason this might not work is if the printer resets these kind of settings after each print.
Never preceed any demonstration with anything more predictive than "watch this"
TMcB
Super Advisor

Re: Printer Line Termination

The printer is setup as a remote printer.

I thought what I'd try to do before hand is create a text file, with the esc sequence and a few lines of text, and send this in the normal way.

eg - test.print
^[&k3G
test
test

I then ran "lp -dsgmrp2 test.print
But it still prints out staircased and displays the k3G at the start.

This must be the wrong escape sequence.
Is it possible to test it in this way?

Thanks

Mark Grant
Honored Contributor

Re: Printer Line Termination

That does sort of suggest that the escape sequence is incorrect. Are there no configuration changes you can make on the printer itself? usually there is something that allows you to add carriage return at the end of a line. Or sometimes it's to actually remove newlines.
Never preceed any demonstration with anything more predictive than "watch this"