At 14:58 08/03/00, Michael Griffin wrote:
>Someone mailed about being able to print to netware printers
>using nprint. I can also do this, but it comes out in a
>staircase. A really bad one at that.
>It prints the first line and instead of going to the start
>of the next line to start printing, it just jumps down a
>line.
>>Anyone got any idea how to fix this?
Unix text format: every line ends in a line feed, which is exactly what the
printer is doing, a line feed. What you also want is a carriage return.
Translating the text with something like
perl -pe 's/\n/\r\n/g'
should do the trick, you could do this by printing like this
perl -pe 's/\n/\r\n/g' < file_to_print | lpr
or by inserting this perl command as a filter or preprocessor into your
printing system for anything headed for the netware printer,
Fergal
P.S. It can also be done with a similar sed command if you don't like perl,
but I couldn't get it to work.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!