TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:12760] WP 8 and printing
>Is anyone else having trouble printing from WP 8? My printer settings for
>lpr seem to be correct, as I can print anything else using 'lpr <file>'
>but when I attempt to print from WP the file just sits in the queue and
>never actually prints.
I had a problem like I think you're describing, some time ago. the
file is sent to be printed, but just stays in the queue.
it turns out the problem was a lack of a line feed at the end of the
file. there's a line of sed code in the RedHat print filter that does
CR->CR/LF conversion; and if you replace it with a line of awk, it works fine.
to test this theory; try copying the file out of the print spool (look in
/var/spool/lpd/printer_name and find the right df* file), and see if you can
lpr it. if that doesn't work, open it with a text editor, then save it, and
see if you can lpr the file then.
opening it with a proper UNIX text editor should put the right
characters at the end of the file; and it'll work.
also, you can use cmp or diff on the two files (a copy of the
unedited one; and the one after you saved it from a text editor); and see
what shows up.
also, the edited one grew by one byte, in my case.
if indeed you *can* lpr the file you grabbed out of the spool (without
editing it); what I'm thinking of is probably not the problem.
if indeed it is the problem; look for the line of sed that does CR->CR/LF
conversion (I forget what it looks like), and change it to
awk '{print $0"\r"}'
this should fix it. (of course, I could be very wrong).
Carl Soderstrom
System Administrator 307 Brighton Ave.
Minnesota DHIA Buffalo, MN
carls@agritech.com (612) 682-1091