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
Received on Tue Dec 22 1998 - 20:17:00 NZDT