#!/bin/sh
# $Id: gsepagif.sh,v 1.6 2000/07/08 04:29:25 nari Exp $
# output filter for EPSON LP-9200S

GS="/usr/local/bin/gs"
ERT="/usr/local/bin/ert"

SIZE=a4
DEV=epag
RES=300
EARG="-lang ESC/Page"
XOFF=0
YOFF=0

ARG="-q -dNOPAUSE -dSAFER -dBATCH"
ARG="$ARG -sPAPERSIZE=$SIZE -sOUTPUTFILE=- -sDEVICE=$DEV"
ARG="$ARG -dEpagOffX=$XOFF -dEpagOffY=$YOFF"

 case $0 in
  *both.sh) ARG="$ARG -dDuplex";;
  *flip.sh) ARG="$ARG -dDuplex -DTumble";;
  *300.sh)  RES=300; EARG="$EARG RS=QK";;
  *600.sh)  RES=600; EARG="$EARG RS=FN";;
  esac

ARG="$ARG -r$RES -"

$GS $ARG | $ERT $EARG

