Operating System - HP-UX
1827295 Members
2726 Online
109717 Solutions
New Discussion

Re: staircase problem printing

 
Johan den Boer
Occasional Contributor

staircase problem printing

Hi,

Does anyone know how to fix the staircase problem when printing to lp. I have a
xerox printer.

regards

Johan den Boer
6 REPLIES 6
Santosh Nair_1
Honored Contributor

Re: staircase problem printing

Johan,

This can be fixed by editing the model script. Which Xerox printer is it? I know they have model definitions for some of their printers on HPUX.

-Santosh
Life is what's happening while you're busy making other plans
Ralph Grothe
Honored Contributor

Re: staircase problem printing

It seems you are using the wrong filter.

I would assume your printer is expecting each line to be terminated by a \r\n sequence, but it's only getting the standard Unix EOL \n.
You can easily fix this by sed'ing the EOLs.
But for a filter this is a poor hack.
Better get some free filter like a2ps (if it's ASCII files)
Madness, thy name is system administration
Santosh Nair_1
Honored Contributor

Re: staircase problem printing

Also, you can get one of the many printing utilities, such as enscript, a2ps or mpage which generate postscript output (and generally have nicer output than text).

-Santosh
Life is what's happening while you're busy making other plans
Frank Slootweg
Honored Contributor

Re: staircase problem printing

As others have mentioned, this is probably a LF (linefeed) versus CR+LF (carriage-return + linefeed) problem.

If you can use an external pipeline, then you can probably solve your problem with ux2dos(1), i.e.

cat file | ux2dos | lp -d ....

If you can not use an external pipeline, then you can use ux2dos(1) in a *copy* of the current model script and remove/re-add the printer while specifying the new model script.
For this, you will need to have some expertise in understanding/modifying shell scripts.

For details, see the "Models" section in the lpadmin(1M) manual page.
Bill Thorsteinson
Honored Contributor

Re: staircase problem printing

I don't know which model of printer you have but
some printers have an option to make linefeed
generate a carriage return.

Check the text mode options for the printer.
If you can't change the printer, you are stuck with
changing the filter.

In PCL the command &k2G
will change the line termination as follows:
cr -> cr; lf -> cr-lf; ff -> cr-lf.

Carlos Fernandez Riera
Honored Contributor

Re: staircase problem printing

Or you can change printers configuration, changing CR=0D to CR==0D0A

See printers manual.
unsupported