#! /bin/sh # # 両面印刷機能つきPostScriptプリンタで印刷モードを選択 # # revision history: # Dec. 16, 2001 by Dai ISHIJIMA # # Usage: # duplex-lpr [-none|-long|-short] [postscript file] # # Options: # -none: 片面印刷 # -long: 長辺とじ両面印刷 # -short: 短辺とじ両面印刷 # # Example: # cat hogehoge.ps | duplex-lpr -short | lpr # # 動作確認: # FreeBSD 4.x, Brother HL-1670N, EPSON LP-8300CPD # duplex=false short=false case x"$1" in x-n*) duplex=false; short=false; shift;; x-l*) duplex=true; short=false; shift;; x-s*) duplex=true; short=true; shift;; esac echo "%!" echo "1 dict dup /Duplex $duplex put setpagedevice" echo "1 dict dup /Tumble $short put setpagedevice" cat "$@" exit 0