mirror of
https://github.com/webmin/webmin.git
synced 2026-02-07 07:52:13 +00:00
36 lines
560 B
Bash
Executable File
36 lines
560 B
Bash
Executable File
#!/bin/sh
|
|
source /etc/sysconfig/printers/XXX
|
|
if [ "$PAPERSIZE" = "a4" ]; then
|
|
T=A4
|
|
else
|
|
T=Letter
|
|
fi
|
|
|
|
enscript -M $T -Z -p - |
|
|
|
|
if [ "$DOUBLEPAGE" = "true" ]; then
|
|
psnup -d -b0.6cm -p$PAPERSIZE -2
|
|
else
|
|
cat -
|
|
fi |
|
|
|
|
if [ "$GSDEVICE" = "PostScript" ]; then
|
|
cat -
|
|
elif [ "$GSDEVICE" = "uniprint" ]; then
|
|
exec 3>&1 1>&2
|
|
gs @$UPP.upp -q -sOutputFile="|cat 1>&3"
|
|
else
|
|
gs -q $GSOPTIONS -sDEVICE=$GSDEVICE \
|
|
-r$RESOLUTION \
|
|
-sPAPERSIZE=$PAPERSIZE \
|
|
-dNOPAUSE \
|
|
-dSAFER \
|
|
-sOutputFile=- -
|
|
fi
|
|
|
|
if [ "$SENDEOF" != "" ]; then
|
|
printf "\004"
|
|
fi
|
|
|
|
exit 0
|