Operating System - HP-UX
1753416 Members
7172 Online
108793 Solutions
New Discussion юеВ

Printing problems.. Out of alignment

 
SOLVED
Go to solution
Jim Allan
Advisor

Printing problems.. Out of alignment

All,

I'm printing from the command line simply using "lp testfilename" where testfilename is just a plain vi text file with several lines of plain text.

When it prints, the first line will come out, but the text will continue off the page, so i only ever get the first line.

The printer is a HP Laserjet 2200DN, client is HP-UX 11.11, printer was added using addqueue

THanks

jimmy
8 REPLIES 8
Peter Godron
Honored Contributor

Re: Printing problems.. Out of alignment

Hi,
sorry. I'm not 100% clear on the exact problem. What do you mean by 'continue off the page'?
Does all the text in the file continue to print on the first line i.e. past the edge of the page
or
the first line is printed ok then the print
continue down the page in single characters.
Either way initial tests:
Print a testpage from the printer's panel
Check that the driver in use is correct
Check the page definition
Let me know what happens !
Eric Antunes
Honored Contributor

Re: Printing problems.. Out of alignment

Hi Jimmy,

Can you post here the testfilename in attachment to try here?

Best Regards,

Eric Antunes
Each and every day is a good day to learn.

Re: Printing problems.. Out of alignment

Hi,

This problem is called stair-stepping effect. This is because unix files do not have a CR at the end of each line. To get a file printed fine, data need to be "cooked" by the model script.

Since you used addque to configure your printer, I think the problem is related to the model script you are using.

Can you verify with :

#what /etc/lp/interface/model.orig/printername

you should have net_lj4x or net_ljx000.

If not, try :

#cp /opt/hpnpl/sh/net_lj4x /etc/lp/interface/model.orig/printername

and then try to print. You don't need to restart the spooler.

Nourreddine
Bill Hassell
Honored Contributor
Solution

Re: Printing problems.. Out of alignment

This is likely a classic Unix remote printing problem. Your text is stair-stepping down the page, as if there was no carriage return after each line (and that's the reason). What is happening is that all Unix text files have a single character as the line terminator: line feed. So your file is being printed in raw mode (no cannonical processing) and the carriage return is not being appended. To verify this, print your file this way:

ux2dos testfilename | lp -d

Now the defaults for addqueue should not have changed the printer script which sets: outputmode="cooked". Since the JetDirect scripts have gotten quite complex, check if someone has modified the active script:

diff /opt/hpnpl/sh/net_ljx000 /etc/lp/interface/model.orig/

If there are differences, just reinstall the printer with:

/opt/hpnpl/bin/removequeue -q
opt/hpnpl/bin/addqueue -q -h 12.34.56.78

If there are no differences, try printing with the -otext option:

lp -otext testfilename

If that works and the diff command above shows no differences, somehow, the template file(s) in /opt/hpnpl/sh have been modified. Download a clean copy of HPPI. Then run the diff again. Installing HPPI will not change the currently defined printers of their scripts. If diff now shows a difference, just delete and reinstall as above.


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor

Re: Printing problems.. Out of alignment

Hi Jimmy,

Check on the printer and see what the printer CR setting is set to using the printer control panel. Set to CR=CR+LF and try.

Hope this helps.

Regds
Jim Allan
Advisor

Re: Printing problems.. Out of alignment

thanks for the reponses all, i'm not back on site there until next wednesday, so i'll try your responses then,

it is stepped down the page, so i'll try the unix 2 dos conversion
Jim Allan
Advisor

Re: Printing problems.. Out of alignment

ux2dos filename | lp

this has solved the problem, thanks for the help
Jim Allan
Advisor

Re: Printing problems.. Out of alignment

ux2dos