TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:7538] printing (lpr/lpd?) problems - further clarification



ok, further experimentation shows that I may have been wrong about the ^L
character.
        the ^L does indeed seem to be a page-eject/form feed character (the
man page and behavior for 'more' indicates so; and multi-page documents have
it at each page break)
        the *really interesting* discovery is that: multi-page reports print
fine. single-page reports still jam in the spool. ;(
        and I can't find any difference in the characters at the end of the
report. ;(
        which brings us to check the escape sequences at the head of the report:
(I stopped the print spool, printed these files, copied them from the spool
directory, then restarted the spool)
[root@office /tmp]# head -n1 head.rpt; head -n1 head2.rpt 
62F0O10H62F0O16.6H62F0O10H62F0O16.6H08/27/1999
MINNESOTA DHIA                                                          Page
1
62F0O10H62F0O16.6H62F0O10H62F0O16.6H08/27/1999
MINNESOTA DHIA                                                          Page
1
        which both look the same. ;(
        sending them gives me this:
[root@office /tmp]# lpq -P hp4v 
office.mndhia.org: sending to 206.1.87.200
Rank   Owner      Job  Files                                 Total Size
0 bytes
2nd    root       574  head.rpt                              2700 bytes
3rd    root       575  head2.rpt                             11186 bytes

connection to 206.1.87.200 is down

but; if I kill #574; the second one (the multipage report) prints out fine.

I think I'm at the point where I have a legitimate bitch with/bug report to
send to the vendor.

about my sed question:
>A little shorter version.
>cat <filename> | sed 's/^L$//g' | lp (or lpr, whichever)
>The ^L$ matches with ^L at end of line.
        this doesn't work; tried it several times, and several variations
thereon that people sent me. finally realized it's looking for the
characters '^' and 'L', rather than the escape sequence '^L'. the escape
sequence doesn't print when you cat the file; it only shows in 'more' or
'pico' (haven't tried vi).

btw, how do you set the default printer in your environment settings? so I
don't have to specify '-P hp4v' every time I want to do something with it.

thanks much!
Carl Soderstrom