From owner-freebsd-questions Sun Sep 20 17:53:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA17176 for freebsd-questions-outgoing; Sun, 20 Sep 1998 17:53:04 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from abc.xyz.net (froggy.anchorage.ptialaska.net [208.151.119.238]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA17171 for ; Sun, 20 Sep 1998 17:52:55 -0700 (PDT) (envelope-from groggy@iname.com) From: groggy@iname.com Received: from localhost (localhost [127.0.0.1]) by abc.xyz.net (8.8.8/8.8.8) with SMTP id QAA01746; Sun, 20 Sep 1998 16:51:26 -0800 (AKDT) (envelope-from groggy@iname.com) Date: Sun, 20 Sep 1998 16:51:26 -0800 (AKDT) X-Sender: abc@abc.xyz.net To: BEAUPRE Antoine cc: Francisco Reyes , freebsd-questions@FreeBSD.ORG Subject: Re: How to print plain ASCII file In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Is there a tutorial/source for printing simple ASCII files. if your replaced the stuff with normal control characters, and use the ghostsript command for your particular printer, this will print DOS/UNIX text files, as well as PostScript (Netscape HTML) pages by simply stating "lp FILE" ... NOTE the "if" printcap command. hope this ends this question once and for all ;) i got this straight from the handbook (almost). #!/bin/sh # # LP Filter (PS/DOS/UNIX) ... printcap :if=usr/libexec/lpr/lpf: 1997(c)KERR read line1 if echo $line1 | grep -q %!; then \ /usr/local/bin/gs -q -g2550x3250 -r300 -dBATCH -sDEVICE=djet500 \ -sOutputFile=- - && exit 0 elif echo $line1 | grep ; then \ cat && echo && exit 0 else echo $line1; \ cat | sed s/$// && echo && exit 0 fi exit 2 # BUGS: when printing text files, a cr/lf is always printed at the top # of the 1st page of each document, leaving only 65 of 66 lines # left for printing on my djet500 (1st page only). # requires ghostscript for postscript printing. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message