On Mon, 12 Aug 2002, Rick Moen wrote: > > How do I configure debian to use a printer? ... > Install packages gs, apsfilter, a2ps, mpage, recode, enscript, lpr.
Also you need to preprocess your files before you send them to the printer. 1. To print \n-terminated Unix text files I use a command like: pr -o 5 ... filename.txt | crlf | lpr Here, "pr" "formats" the page to set left-margin offset, paper size, top and bottom margins, etc. The program "crlf" is a little program that I wrote that converts \n to \r\n so that you do not get the stair-case effect of printing true Unix text files. 2. To print TeX and LaTeX documents you need to do something like this: tex filename.tex dvilj4 filename.dvi cat filename.lj | lpr Now "tex" and "dvilj4" are part of any respectable TeX package like TeTeX and nTeX. This assumes that you have a laserjet4. If you have Color inkjet printer, you need dvidjc (DeskJet color), but I have not gotten dvidjc to work with mktexpk, the runtime dynamic font generator that works with all of the dvi-driver programs of tex. Why can't the TeX writers put dvidjc within the tex source-tree so that it builds with mktexpk support? 3. To print a webpage from your browser, have your browser print to a file, to get a postscript file, say filename.ps. If you have a laserjet printer, you can print this using /usr/bin/gslj (part of the ghostscript distribution). Gslj is effectively: gs -q -sDEVICE=laserjet -r300 -dNOPAUSE filename.ps > filename.lj exit cat filename.lj | lpr If you have DeskJet color, you just need to change the -sDEVICE= option on the gs command line. 4. To print an adobe acrobat file (*.pdf), there is a program pdf2ps that converts the acrobat file to postscript, which you can print using gs, as in #2. PMana _ Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph To leave: send "unsubscribe" in the body to [EMAIL PROTECTED] To subscribe to the Linux Newbies' List: send "subscribe" in the body to [EMAIL PROTECTED]
