Trying to print with lpr produces blank pages


New Member

Messages: 5

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:

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:

I also have lpd_enable="YES".

I would appreciate any suggestions.


Well-Known Member

Reaction score: 171
Messages: 367

you probably need an input filter to convert the file in the printer language (pcl, postscript etc)


Aspiring Daemon

Reaction score: 322
Messages: 874

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.


New Member

Messages: 5

Thank you for your remarks. If I print as follows, I get most of the nroff formatting, but not the underlining or italics:

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

I then added this filter to /etc/printcap:


However it made no difference.