tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* PS to PCL converter available?
@ 1998-12-22 20:16 Tri H. Tran
  0 siblings, 0 replies; only message in thread
From: Tri H. Tran @ 1998-12-22 20:16 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-12-22 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-22 20:16 PS to PCL converter available? Tri H. Tran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox