From owner-freebsd-questions Fri Jul 19 11:03:33 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA10831 for questions-outgoing; Fri, 19 Jul 1996 11:03:33 -0700 (PDT) Received: from cornus.FSL.ORST.EDU (root@FSL.ORST.EDU [128.193.112.105]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA10826 for ; Fri, 19 Jul 1996 11:03:31 -0700 (PDT) Received: from picea.FSL.ORST.EDU (hernanw@picea.FSL.ORST.EDU [128.193.112.3]) by cornus.FSL.ORST.EDU (8.6.9/8.6.9) with ESMTP id LAA09666 for ; Fri, 19 Jul 1996 11:03:29 -0700 Received: (from hernanw@localhost) by picea.FSL.ORST.EDU (8.7/8.6.9) id LAA20341; Fri, 19 Jul 1996 11:03:28 -0700 (PDT) Date: Fri, 19 Jul 1996 11:03:26 -0700 (PDT) From: Wayne Hernandez To: questions Subject: ghostscript and remote printers Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I seem to be unable to print ps files to a hp laserjet ii on a jetdirect card. I can print plain text files fine. When using gs from the command line, it always wants me to enter quit. This is my /etc/printcap entries: fsl363|3|ljII:\ :sh:\ :if=/usr/lib/hpnp/hplj.if.sh:\ :of=/usr/lib/hpnp/hplj.of.sh:\ :lp=/dev/null:\ :lf=/var/log/lpd-errs:\ :sd=/var/spool/fsl363: # # test for print ps file on fsl363 # ps|LJII Postscript (Ghostscript PS->PCL Conversion):\ :lp=/dev/null:\ :sd=/var/spool/ps:\ :lf=/var/log/lpd-errs:\ :of=/usr/local/bin/gslj:\ :sh: This is gslj: #!/bin/sh PRINTER=fsl363 GS_LIB=/usr/local/lib/ghostscript/fonts export PRINTER GS_LIB exec gs -q -sDEVICE=laserjet -r300 -dNOPAUSE -- gslp.ps --heading-center "`date`" "$@" I won't include hplj.if.sh, since it's large, but it calls /usr/local/libexec/netprint $PERIPH $PORTS which is: #!/usr/local/bin/perl # # netprint - Text filter for printer attached to network # Installed in /usr/local/libexec/netprint # $#ARGV eq 1 || die "Usage: $0 "; $printer_host = $ARGV[0]; $printer_port = $ARGV[1]; require 'sys/socket.ph'; ($ignore, $ignore, $protocol) = getprotobyname('tcp'); ($ignore, $ignore, $ignore, $ignore, $address) = gethostbyname($printer_host); $sockaddr = pack('S n a4 x8', &AF_INET, $printer_port, $address); socket(PRINTER, &PF_INET, &SOCK_STREAM, $protocol) || die "Can't create TCP/IP stream socket: $!"; connect(PRINTER, $sockaddr) || die "Can't contact $printer_host: $!"; while () { print PRINTER; } # printf "\f"; exit 0;