[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stairstep printing on an HP Deskjet



Corey Hickey wrote:
[snip]
Currently, if I try to print a text file by using:
$ lpr text.txt
I get a stairstep effect - the first line is good, the next line is
tabbed over, the next line even farther, etc. From searching google,
I've determined that this is to be expected in HP printers, and must be
corrected for in either printcap or some filter. Unfortunately, I
haven't come across anything explaining exactly _how_ to go about doing
this. Could somebody please point me in the right direction?
[snip]

This is due to the difference between Unix text format and the DOS text format. Unix uses LF (linefeed) as the line terminator; DOS uses LFCR (linefeed-character return). With an HP printer, sending just an LF makes the printer advance to the next line. A CR is required to return the printing to the beginning of the line.

So, therefore, a quick way to get a unix text file to print on an HP printer is to convert it to DOS text format. You can do this using "todos" from the sysutils package. To do the opposite (convert from DOS format to Unix), use the "fromdos" command.

Cheers,

Robert



Reply to: