@echo off

rem This batch file assumes that you are using GhostScript to print
rem the PostScript that Executor creates.  It assumes that GhostScript
rem has been installed in C:\GS.  If you install GhostScript anywhere
rem else, you'll need to change this file and also change printers.ini

rem arguments to this batch file are
rem %1 is the directory that contains this batch file
rem %2 is the name of the spool file
rem %3 is the printer type
rem %4 is the printer port

cd "%1"
echo -q -dNOPAUSE -IC:\GS;C:\GS\FONTS > gs.txt
echo -sDEVICE=%3 >> gs.txt
echo -sOutputFile=%4 >> gs.txt
echo "%2" >> gs.txt
echo -c quit >> gs.txt

set PATH=C:\gs

rem box works only under Windows 95 and it gets us in trouble
rem box on some systems because of video driver problems
rem box -delete "%2" gs @gs.txt

gs @gs.txt
del gs.txt

if not "%2" == "%4" del "%2"
