Operating System - HP-UX
1846573 Members
1997 Online
110256 Solutions
New Discussion

problem with a network printer

 
SOLVED
Go to solution
Stefano_10
Advisor

problem with a network printer

I have some problems printing on a network printer. I have configured a network printer like a remote printer in SAM. I have inserted the name, the ip-address and a remote name.
When I print a text file with lp command the printer prints the file whitout the CR: when starts a new line it begins to write from the next column in which finished the previous line.
If I print a pdf file the printer dosn't start to write from the first column of the paper sheet but more on the right.
Which parameters do I have to set and where can I set them?

Thanks

Stefano
11 REPLIES 11
Steve Steel
Honored Contributor

Re: problem with a network printer

Hi

You are printing a text file from a pc

Put it through dos2ux before printing.

see man page.


Jetadmin software is free

What type of printer is it.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Greg Martin
Advisor

Re: problem with a network printer

Sounds like the printer driver is wrong or corrupt.
If it's an HP printer, older model drivers are often valid for new models with unavailable drivers. If it's a new non-hp printer, they often offer emulation at some early hp level. You might try something like laserjet III for a minimal configuration; if that works, look for a specific drive for your model. Current jetadmin is available somewhere in hp-webland, which might contain the appropriate driver and/or uncorrupted drivers.

Duh - have you tried power cycling the printer?
greg.
Stefano_10
Advisor

Re: problem with a network printer

The text file that I try to print isn't a dos file. I created it with vi.
I haven't used jetdirect to configure the printer; and SAM didn't ask the model of printer during the configuration of the printer like a remote printer.
Devbinder Singh Marway
Valued Contributor

Re: problem with a network printer

one thing you can have a look at is the interface file for your printer /etc/lp/interface , it is probably using rlp to print , have a look in there if there are any options for sending CR character, the other thing is that it sounds like , a file is sent as it is to your printer , have a look at your printer to see if there is a CR/LF parameter if so set it on the printer. Another option is , try what Greg said , if your printer emulates a HP printer , set it up on the printer and add a printer using jetadmin.

laters
Seek and you shall find
S.K. Chan
Honored Contributor

Re: problem with a network printer

Is it printing in "stair steps" manner ? Since you did not mention what printer it is, I'm guessing this is probably a third-party printer (non-HP) and sometimes you have to manually edit the lp interface file and append an escape code to solve this as long as the printer understand PCL it should work. Try this ..(assuming printer name = printer1)
# cd /etc/lp/interface
# cp printer1 printer1.org
# vi printer1
==> In between the line

shift; shift; shift; shift; shift

and

/usr/sbin/rlp -I$requestid $BSDC $BSD ..

append this

mv $1 ${file}~
( echo "^[&k3G"; cat ${file}~ ) > $1

Inserting the escape code can be tricky, you have to go to insert mode, while pressing CTRL, enter "v" and then ESC key followed by "&k3G".
Now try to print again ..
Stefano_10
Advisor

Re: problem with a network printer

yesterday I have try to use all the parameters present in the file in /etc/lp/interface/ but nothing solve the problem.
I have configured two printer a lexmark and an HP; and i have the same problem on both.
I have try to use the suggest of Chan:
mv $1 ${file}~
( echo "^[&k3G"; cat ${file}~ ) > $1
but nothing is changed.
i haven't found any parameters in the man of lp ro rlp to set the use of CR/LF.
Steve Steel
Honored Contributor

Re: problem with a network printer

Hi

If this is a HP printer then you should use Jetdirect

You lose 90% of a printers options otherwise.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Stefano_10
Advisor

Re: problem with a network printer

I succeded to configure correctly the hp printer that is a jetdirect printer using the instruction given by Chan in an other message.
Yesterday i had some problems to configure that printer like jetdirect printer in SAM.
Anyway I have a printer that give me the problem of above.

Stefano
Bill Hassell
Honored Contributor
Solution

Re: problem with a network printer

This is a classic problem: network printing and remote printing. When we talk about JetDirect, we are referring to the HP interface card (and also the external adapter box) which can communicate using two protocols: rlp (port 515) and JetDirect (port 9100). If the printer is connected directly to the LAN *AND* you used the JetDirect software (not SAM) to add the printer using the addqueue command, then your problem will disappear and you'll have dozens of new options that will work.

However, if you added to the printer to HP-UX as a remote printer, then rlp will be used, regardless of whether you are directing the print job to a PC server or to an HP JetDirect card or a non-HP network interface. Under these conditions, there is *NO* trasnlation of the data, and a plain ASCII file on all flavors of Unix contains:

text...LF more text...LF

whic is what you see on your paper (stairstep). This can only be fixed in two ways:

Instead of: lp -dMyPrinterName MyFile

Use: ux2dos MyFile | lp -dMyPrinterName

(the command ux2dos adds a CR to every LF, and the dos2ux command takes away the CR from every CR/LF pair)

or:

Assuming the printer is truly connected to the LAN by means of an HP JetDirect card, delete the printer in HP-UX with lpadmin -x and then run the addqueue command (found in /opt/hpnp/bin or /opt/hpnpl/bin) to add the printer. At that point, you'll have your expected output and options like -olandscape will start working.


Bill Hassell, sysadmin
Greg Martin
Advisor

Re: problem with a network printer

Bill, great discussion of the difference between remote and network printing, something I'd never looked at. Should configuring a network thru SAM, which calls jetadmin, work for Stefano? Command line jetadmin does (as I recall) bring up an interface with many more options for debugging, etc.

Stefano, if you don't have jetdirect, it's a free download from somewhere in hp printer support (not the software site or patch site), also distributed on the cd with new hp printers.
Bill Hassell
Honored Contributor

Re: problem with a network printer

When you run SAM and select Add network printer, it will call jetadmin or hppi. jetadmin has been obsolete for some time but most of the functionality is found in hppi. Since addqueue, removequeue and modifyqueue are so easy to use, I usually recommend bypassing SAM or jetadmin/hppi.

However, the reason for the detailed explanation is the confusion over network printers versus remote printers (on print servers). SAM can add either but remote printers have very limited capability (unless the remote print server is also HP-UX). Thus, the preferred connection is through an HP JetDirect card in the printer. But if thatis not the case, the connection must be a remote printer.


Bill Hassell, sysadmin