Groff printing from Linux to Windows network printer

Michael Velez mikev777 at hotmail.com
Tue May 24 19:33:39 UTC 2005


 
I'm trying to print groff format from my linux machine to a network printer
on a windows system.
 
I created a small groff file with the following commands.
 
--------------- START OF FILE ----------------
nf
ps 8
vs 8
tl 'THIS IS THE TITLE''050518'
 
Text of ascii file, spanning multiple print pages, needing to be formatted.
 
--------------- END OF FILE --------------------
 
I then execute the following command:
 
groff -l -ma4 <filename>
 
The above file prints correctly with said changes (font size and line
spacing) except that on each page the first few lines are not printed.
Initially assuming that it was an issue with the page size, I set printing
to the A4 format (as I live in Europe) and tried various page lengths.
Nothing helped.
 
If I just use the 'lpr' command, I get all lines properly printed (of course
not formatted so the .nf and other commands appear as pure text).
 
Does anybody know why this is happenning?
 
Should the groff printing work at all as I didn't "consciously" set the
printer as a Postscript printer? (Forgive my ignorance as this is the first
time I use groff).
 
If I do the same groff command from my Windows machine (using Cygwin), it
seems it is the postscript output that gets printed. But on Linux, the file
gets properly formatted and only the formatted file (not the postscript
output) is printed.  I don't have a good idea how printing is managed on
Linux but I'm assuming by default there is a Postscript
processor/interpreter(?).
 
Is there an easy way to get this to work?  Is there a better way to print an
ascii text file that needs to be slightly reformatted?
 
Michael
 



More information about the redhat-list mailing list