Re: [SLE] Duplex printing with PostScript
Several people have been asking how to turn duplex printing on and off. I unearthed some material on this in /usr/doc/packages/aps/OPTIONS. Have a look! Just remember that it doesn't work with lprold, the old lpr package, because that version of lpr doesn't recognize the -Z option.
A while ago I wrote configuration options for dvips to do exactly this. Below are files config.duplong and config.dupshort, they must be saved with those names where dvips looks for both PS-headers and(!) config files, as these files are doubling up as both header and config. Binding is on long resp short side. Usage: dvips -Pduplong ... somefile To do: write a filter which can insert the relevant code at the correct place of any postscript file... Volker (Yes I will upload it to CTAN shortly) --------cut---------- % % config.duplong % Configuration and header file for dvips. Load with: dvips -P duplong. % % Prints in duplex mode with binding on the long edge if the printer % has a duplex unit, otherwise it will be ignored. % Works on: HP LaserJet IIISi, HP LJ 4m, 4m+, 4mv, 5, gs 3.33, 5.10. % % This file is built so it can be used both as the header file for % PostScript and as the configuration file for dvips. % (Note that dvips ignores any lines beginning with a space or a "%".) % % Volker Kuhlmann, 20 Feb 1995, 16, 18 Jan 1998, 5 Feb 1998 % VOLKER@ELEC.CANTERBURY.AC.NZ % %statusdict begin true setduplexmode false settumble end /setpagedevice where { pop % throw dict name % gs 3.33 does not have /Duplex, /Tumble in pagedevice dict currentpagedevice /Duplex known { %<< /Duplex true >> % << >> are level 2 only /tmpdict 1 dict def tmpdict /Duplex true put tmpdict setpagedevice } if currentpagedevice /Tumble known { /tmpdict 1 dict def tmpdict /Tumble false put tmpdict setpagedevice } if }{ statusdict begin true setduplexmode false settumble % this does not work with gs 3.33 (undefined error) end } ifelse % { % start a procedure so PostScript `ignores' the dvips options. h config.duplong } pop % PostScript cleanup % % EOF config.duplong --------cut---------- % % config.dupshort % Configuration and header file for dvips. Load with: dvips -P dupshort. % % Prints in duplex mode with binding on the short edge if the printer % has a duplex unit, otherwise it will be ignored. % Works on: HP LaserJet IIISi, HP LJ 4m, 4m+, 4mv, 5, gs 3.33, 5.10. % % This file is built so it can be used both as the header file for % PostScript and as the configuration file for dvips. % (Note that dvips ignores any lines beginning with a space or a "%".) % % Volker Kuhlmann, 20 Feb 1995, 18 Jan 1998, 5 Feb 1998 % VOLKER@ELEC.CANTERBURY.AC.NZ % %statusdict begin true setduplexmode true settumble end /setpagedevice where { pop % throw dict name currentpagedevice /Duplex known { /tmpdict 1 dict def tmpdict /Duplex true put tmpdict setpagedevice } if currentpagedevice /Tumble known { /tmpdict 1 dict def tmpdict /Tumble true put tmpdict setpagedevice } if }{ statusdict begin true setduplexmode true settumble end } ifelse % { % start a procedure so PostScript `ignores' the dvips options. h config.dupshort } pop % PostScript cleanup % % EOF config.dupshort --------cut---------- -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (1)
-
kuhlmav@elec.canterbury.ac.nz