Andreas Klemm on Sat, 26 Aug 2000 19:30:33 +0200 (CEST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: apsfilter 6.0-devel: more options for -Z


Hi !

> Feel free to incorporate this patch in the current development.

I'm not sure where exactly to locate the options ...
For what printer are they exactly ?
I assume for true PS printers, or ?

I applied your diff (which in the meantime not applied cleanly)
and moved the options around a bit ..., look patch applied.

Is it correct that way ?

Could you please also document your new options in man/apsfilterrc.1
please ?

	Andreas ///


-- 
Andreas Klemm                                           Powered by FreeBSD SMP
Songs from our band >>64Bits<<............http://www.apsfilter.org/64bits.html
My homepage................................ http://people.FreeBSD.ORG/~andreas
Please note: Apsfilter got a NEW HOME................http://www.apsfilter.org/
? xxx
Index: bin/apsfilter
===================================================================
RCS file: /var/apscvs/APSCVS/src/apsfilter/bin/apsfilter,v
retrieving revision 1.175
diff -u -u -r1.175 apsfilter
--- bin/apsfilter	2000/08/25 16:23:10	1.175
+++ bin/apsfilter	2000/08/26 17:12:40
@@ -880,7 +880,9 @@
 
     case "$PRINTER" in
 	PS_*dpi)
-	    print_data "$@" ${PS_UTILS:+| '$PS_UTILS'}
+	    print_data "$@" ${PS_UTILS:+| '$PS_UTILS'} \
+		${PS_BOOK:+| '$PS_BOOK'} ${PS_NUP:+| '$PS_NUP'} \
+		${PS_DUPLEX:+| '$PS_DUPLEX'} ${PS_DRAWER:+| '$PS_DRAWER'}
 	    return
 	    ;;
     esac
@@ -899,6 +901,8 @@
     eval "$@" | case "$PRINTER" in
 	*.upp)
 	    print_data ${PS_UTILS:+'$PS_UTILS' |} \
+		${PS_BOOK:+'$PS_BOOK' |} ${PS_NUP:+'$PS_NUP' |} \
+		${PS_DUPLEX:+'$PS_DUPLEX' |} ${PS_DRAWER:+'$PS_DRAWER' |} \
 		       gs \
 		       -q \
 		       @'"$PRINTER"' \
@@ -911,6 +915,8 @@
 	    ;;
 	*)
 	    print_data ${PS_UTILS:+'$PS_UTILS' |} \
+		${PS_BOOK:+'$PS_BOOK' |} ${PS_NUP:+'$PS_NUP' |} \
+		${PS_DUPLEX:+'$PS_DUPLEX' |} ${PS_DRAWER:+'$PS_DRAWER' |} \
 		       gs \
 		       -q \
 		       -sDEVICE='"$PRINTER"' \
@@ -1624,6 +1630,34 @@
 	;;
       PS_*dpi)
 	# PostScript printer options
+	case "$option" in
+		book)
+			PS_BOOK="psbook -q"
+			PS_NUP="psnup -q -2"
+			PS_DUPLEX="psset -t"
+			;;
+		1up)
+			unset PS_NUP
+			;;
+		2up)
+			PS_NUP="psnup -q -2"
+			;;
+		simplex)
+			unset PS_DUPLEX
+			;;
+		duplex)
+			PS_DUPLEX="psset -d"
+			;;
+		longbind)
+			PS_DUPLEX="psset -d"
+			;;
+		shortbind)
+			PS_DUPLEX="psset -t"
+			;;
+		0|1|2|3|4|5|6|7|8|9)
+			PS_DRAWER="pstray $option"
+			;;
+	esac
 	;;
       *)
 	# printer driver independent options
@@ -1632,15 +1666,15 @@
 
     # printer driver independent options
     case "$option" in
-      ascii)
-	# force file to be treated as ASCII file
-	METHOD=ascii
-	;;
-      duplex)
-        # "fake" a duplex printer
-        DUPLEX=set
-	;;
-    esac
+		ascii)
+			# force file to be treated as ASCII file
+			METHOD=ascii
+			;;
+		mduplex)
+			# manual duplex printing
+			DUPLEX=set
+			;;
+	esac
   done
   unset option
 fi