From owner-freebsd-questions Tue Jan 28 12:16:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA07639 for questions-outgoing; Tue, 28 Jan 1997 12:16:04 -0800 (PST) Received: from horton.iaces.com (root@horton.iaces.com [204.147.87.98]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA07582 for ; Tue, 28 Jan 1997 12:16:00 -0800 (PST) Received: (from proot@localhost) by horton.iaces.com (8.8.4/8.8.4) id OAA06128; Tue, 28 Jan 1997 14:15:46 -0600 (CST) From: "Paul T. Root" Message-Id: <199701282015.OAA06128@horton.iaces.com> Subject: Re: postscript printing via non-postscript printer To: ping@stepnet.com (Ping Mai) Date: Tue, 28 Jan 1997 14:15:46 -0600 (CST) Cc: freebsd-questions@freebsd.org In-Reply-To: <199701281941.LAA01603@tibet.stepnet.com> from Ping Mai at "Jan 28, 97 11:41:11 am" X-Organization: !nterprise Networking Services - ACES X-Phone: (612) 663-1979 X-Fax: (612) 663-8030 X-Page: (800) SKY-PAGE PIN: 537-7270 X-Address: 200 S. 5th St., Suite 1100 X-Address: Minneapolis, MN 55402 X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk In a previous message, Ping Mai said: > is it possible to setup a non-postscript printer to print postscript > using ghostscript? the printer i have in mind is a canon bjc-4550, or > a hp lj 5l. if the answer is yes can somebody give me some pointers > to printcap, filter, gs setup. > Sure can, I have a bjc-4100. It works great! Your HP will be similar, just put a different device in the gs line. BTW, this is all in the FreeBSD handbook, under printing (Chapter 7 I think). printcap: # @(#)printcap 5.3 (Berkeley) 6/30/90 lp|local line printer:\ :lp=/dev/lpt0:sd=/var/spool/output/lpd:lf=/var/log/lpd-errs:\ :if=/usr/local/libexec/canonif:sh: canonif: #!/bin/sh # # ifhp - Print Ghostscript-simulated PostScript on a Cannon BJC-4100 # Installed in /usr/local/libexec/cannonif # # Treat LF as CR+LF: # printf "\033&k" || exit 2 # # Read first two characters of the file # read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # It's PostScript; use Ghostscript to scan-convert and print it # /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=bjc600 -sOutputFile=- - \ && exit 0 else # # Plain text or HP/PCL, so just print it directly; print a form # at the end to eject the last page. # echo $first_line && cat && printf "\f" && exit 2 fi exit 2 -- In a Wonderland they lie, Ever drifting down the stream-- Dreaming as the days go by, Lingering in the gold gleam-- Dreaming as the summers die: Life, what is it but a dream? --Lewis Carol