Trying to print with lpr produces blank pages

I am trying to setup my printer to print using lpr from the command line. My goal is to be able to print documents created in vi with nroff formatting. I have managed to set up my printer using CUPS and if I print in a non-terminal application printing works fine. If however, I print in the terminal, although the printer responds and "prints", it prints out blank pages. This is the case even for a simple text file, as in:

Code:
lpr txt.txt

I have read this link:
I have followed the instructions there.
This is the text I have in my /etc/printcap file:

Code:
lp:\
    :lp=/dev/ulpt0:\ 
    :sh:\
    :mx#0:\
    :sd=/var/spool/lpd/lp:\
    :lf=/var/log/lpd-errs:
I also have lpd_enable="YES".

I would appreciate any suggestions.
 
There are 2 utilities that will process plain text into a postscript file. print/a2ps and print/enscript-letter. I've seen examples where these utilities are incorporated into print filters, but I personally have never been able to get the filters to automatically detect *.txt input and output the print job as postscript. No problem with breaking it down into 2 steps though or setting a printer in the configuration for for each utility.
 
Thank you for your remarks. If I print as follows, I get most of the nroff formatting, but not the underlining or italics:

Code:
nroff experience | /usr/local/bin/lpr -P Brother_HL-L2360D_series

I then added this filter to /etc/printcap:

Code:
:if=/usr/libexec/lpr/lpf:

However it made no difference.
 
Back
Top