[UCLA-LUG] print under novell network using nprint
Josh Barratt
jbarratt@ucla.edu
Thu, 4 May 2000 15:00:30 -0700
This is called stair-stepped text -- it's due to the missing CR in unix text
files. There used to be a checkbox in redhat printtool that lets you turn
off stair stepped text, but it seems to be missing now (?)
Anyway, here's a fix:
Fixing stair-stepped text
If you got stair-stepped text when you redirected text directly to the
printer port, then printing a text file through lpr will be no different.
The answer to this problem is to define a printer filter that will process
the data before it reaches the printer (in this case, we need carriage
returns added to the end of each line).
Defining a printer filter is done by using the if= parameter (if stands for
input filter) in your /etc/printcap file. For example, you could add this
line to your printer definition (don't forget to put the slashes in
appropriate places and restart lpd):
:if=/usr/bin/todos:
Anything that gets printed through that queue will first be passed through
the todos program (which will add the necessary carriage return to the end
of each line). If todos doesn't exist on your system, you can create a
replacement by putting the following lines in /usr/bin/todos (don't forget
to run 'chmod 755 todos' to make it executable).
:#!/usr/bin/perl
while (<>)
chomp;
print "$_\r\n";
}
Have fun . . .
----- Original Message -----
From: MIng Yu <mingqiang.yu@anderson.ucla.edu>
To: <linux@linux.ucla.edu>
Sent: Thursday, May 04, 2000 2:34 PM
Subject: [UCLA-LUG] print under novell network using nprint
> I've configured my linux to be able to print to a novell network
> printer using IPX. Here is what I've done:
>
> 1. in file /etc/rc.d/rc.local, add one line: /sbin/ipx_configure
> --auto_interface=on --auto_primary=on
> 2. in /usr/bin, chmod 4755 to files slist, ncpmount, ncpumount,
> pqlist and nprint.
> 3. under my home directory, mkdir printing
> 4. under home directory, create a file .nwclient with the
> servername/login name in.
> 5. after "ncpmount printing" to the network printer, I'm able to
> print using nprint -q printername filename
>
> The printer does print my file, but there is one problem. Each
> line is printed under the previous line but after the last
> character of the previous line. So, it can only print the first
> few lines and stop. It seems that there are some hidden
> characters before each line so the printer recognizes it with
> some special meaning and indent that line. Could you tell me
> what could cause this problem and how I can fix it?
>
> Thanks.
>
>
> ming
> ----------------------
>
>
>
>
> _______________________________________________
> UCLALUG Linux mailing list - Linux@linux.ucla.edu
> http://linux.ucla.edu/mailman/listinfo/linux
>