From owner-freebsd-questions Tue Apr 15 23:23:41 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id XAA15414 for questions-outgoing; Tue, 15 Apr 1997 23:23:41 -0700 (PDT) Received: from mail.rwth-aachen.de (mail.RWTH-Aachen.DE [137.226.144.9]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id XAA15371 for ; Tue, 15 Apr 1997 23:23:37 -0700 (PDT) Received: from gilberto.physik.rwth-aachen.de (gilberto.physik.rwth-aachen.de) by mail (PMDF V5.0-6 #16313) id <01IHRLXL6PVW90MZSQ@mail>; Wed, 16 Apr 1997 08:22:51 +0000 (GMT) Received: (from kuku@localhost) by gilberto.physik.rwth-aachen.de (8.8.5/8.6.9) id IAA07161; Wed, 16 Apr 1997 08:40:44 +0200 (MET DST) Date: Wed, 16 Apr 1997 08:40:43 +0200 (MET DST) From: Christoph Kukulies Subject: Re: Printing In-reply-to: <3354474B.80E@erols.com> To: cadams@erols.com (Chris) Cc: questions@freebsd.org Reply-to: Christoph Kukulies Message-id: <199704160640.IAA07161@gilberto.physik.rwth-aachen.de> MIME-version: 1.0 X-Mailer: ELM [version 2.4ME+ PL28 (25)] Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I can print plain text, but what do I need to do in order to print stuff > from my browser (Netscape 3.1) or any other application I may be running > under FreeBSD. My printer is an HP Deskjet 500. Thanks. 1. Install ghostscript 4.03 2. Create a /etc/printcap entry a la: lps|lp-postscript|hp ljet III + PostScript filter :\ :lp=/dev/lpt0:\ :sd=/var/spool/output/lps:\ :sh:\ :if=/usr/local/bin/lpf:\ :lf=/var/log/lpd-errs:\ 3. get lprps (from comp.unix.sources) or just use this kind of filter: /usr/local/bin/lpf: #!/bin/sh # psif - Print PostScript or plain text on a PostScript printer # Script version; NOT the version that comes with lprps # Installed in /usr/local/libexec/psif # PRINT_DEV=cdj500 read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # PostScript job, print it. # ( echo $first_line ; cat ) | \ /usr/local/bin/gs -dSAFER -dNOPAUSE -sDEVICE=$PRINT_DEV -sOutputFile=- -q - else # # Plain text, convert it, then print it. # ( echo $first_line; cat ) | /usr/local/bin/textps | \ /usr/local/bin/gs -dSAFER -dNOPAUSE -sDEVICE=$PRINT_DEV -sOutputFile=- -q - fi exit 0 4. type gs -help and lookup your printer in the list of supported devices. If it's not in there build the ghostscript4.03 port again and select the desired devices (or just edit the Makefile) Or just read the handbook chapter on printing. > -- Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de