process/post tries to configure the printer for duplex printing by writing the postscript systemdict; this doesn't work on most printers (without a password, at least). This patch changes the post driver to emit '<< /Duplex true >>' to set duplex mode, in line with the rest of the process/* drivers. Reference: /n/sources/patch/maybe/lp-post-duplex Date: Wed Dec 30 03:09:28 CET 2009 Signed-off-by: lyndon@orthanc.ca --- /sys/lib/lp/process/post Wed Dec 30 03:06:20 2009 +++ /sys/lib/lp/process/post Wed Dec 30 03:06:18 2009 @@ -52,14 +52,21 @@ echo illegal option ''''-i $i'''' ignored >[1=2] } } -#if (! ~ $#DUPLEX 0) { -# if (~ $DUPLEX 1 ) -# PATCH=$PATCH' -#statusdict /setduplexmode known {statusdict begin true setduplexmode end} if'; -# if (~ $DUPLEX 0 ) -# PATCH=$PATCH' -#statusdict /setduplexmode known {statusdict begin false setduplexmode end} if'; -#} +if (! ~ $#DUPLEX 0) { + switch ($DUPLEX) { + case 0; + DUPLEX=false + case 1; + DUPLEX=true + } + PATCH=$PATCH' +%%BeginFeature: *Set DuplexMode +[{ systemdict /languagelevel known {languagelevel 1 gt product (HP LaserJet 4Si) ne and} if { + << /Duplex '$DUPLEX' >> setpagedevice + } {statusdict /setduplexmode known {statusdict begin '$DUPLEX' setduplexmode end} if} ifelse + } stopped cleartomark +%%EndFeature'; +} PATCH=$PATCH' %%EndPatch from lp '