From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078731112116.tru64-unix-managers.marc@archive.invalid> From: "Tri H. Tran" Date: Tue, 22 Dec 1998 20:16:08 +0000 To: tru64-unix-managers Subject: PS to PCL converter available? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078731112116 Hi all, Anyone know of an easy PS to PCL converter when printing to a non-postscript printer for a *.ps file? I've tried using ghostscript (gs) with some success. By the way, the printer is on a remote machine (NT box) serving lpd. I've included my printcap entry and filter script for reference. /etc/printcap: test:\ :lp=/dev/null:\ :if=/soe/lib/filter:\ :sd=/var/spool/lpd/test:\ :lf=/var/adm/lpd-errs: Content of filter script: #!/bin/sh read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # It is PostScript; use Ghostscript to convert and print it # >>> gs with "-sPAPERSIZE=a4" ? # (echo $first_line && cat) | \ /filepath/gs -q -sDEVICE=laserjet -sOutputFile=- | \ /filepath/rlpr -Hhostname -PHP-1100 else # # Text file # >>> send directly to printer # (echo $first_line && cat) | \ /filepath/rlpr -Hhostname -PHP-1100 fi exit <------------------------------> Tri Tran Office of Academic Computing E2130 Engineering Gateway Irvine, CA 92697-2225 (949)824-5887