$VER: EzDuplex.rexx Version 1.05 © 1998 by Gene Heskett, part of EzSoft EzDuplex.rexx is a small arexx program specifically designed to function as a means of printing in duplex mode on a standard, non-postscript printer. This file last updated July 5, 1998, Copyright 1998 by Gene Heskett Distribution: Unlimited as long as this came from the original and unchanged 'EzDuplex.lha' archive. First, a discussion of the generation of files to print. gsrun ----- gsrun is the shell script that drives ghostscript to build the files to be printed, so here is an overview of that, as it runs here. When run in its unmodified state vis-a-vis the output pathnames it uses, will generate a directory full of files, each of which is numbered, starting at 1 from the last time Ghostscript was launched. It runs at a fairly low priority, and therefore doesn't appear to hog the cpu. The usage syntax is probably best described by including the gsrun script here: stack 32767 changetaskpri -10 gs <>CON: -dNOPAUSE -dFIXEDMEDIA -sDEVICE=stcolor -r720x720 -sOutputFile=BIG_T:GSPage-%03d.out data/stcolor.ps -c save pop -f That is setup to drive an Epson Stylus Pro with the files it generates, which are absolutely printer ready coming out of GS, and as such should be printed with a 'copy filename to par:' syntax. Do not use prt:! On launching GS with this script, it opens its usual smallish shell window, and waits for a command, which to render something, consists of the '(device:filepath/filename) run'ENTER Now, you'll note from the syntax above, that I use an assign called BIG-T: to store the individual page files in. So you'll need to set up a suitable assign to use as a scratchpad area. I try to keep around 200 megs free there in case I have to do a 400 page book like the pdf1.2 manual. EzDuplex.rexx ----------- Now, once that render is well and truely close to done, you can run this EzDuplex.rexx program (from the cli with an "rx EzDuplex.rexx"ENTER). The first question it asks is if its doing a 'practice' run, during which time it only shows you the pages that will be printed, or if it is to actually feed the printer. Enter a 'y' to actually enable the printing. I've found it to be a huge paper saver while developing this, and you can make dry runs to verify that it will work as you (or I) intended before embarking on a 400 page print run. Next, it will ask you for several variables, starting with the name of _your_ BIG-T: assign. Then it will ask for the basic filename of the pages to be printed, which in my case it is 'GSPage-000.out' It could be different as I think I now have it properly picking its data out of what you enter for this. That name or a series of them must of course exist. To start someplace in the middle, like you'e already printed the first 100 pages or so, give it a page number to start at in this filename, like GSPage-101.out. Then it will ask for a stopping page, which you can enter if you don't want to print the whole 400 page book in one swell foop. Or you printer doesn't hold or feed reliably, enough paper to do the job in one 'sitting'. Giving it an ENTER at that point will establish a 999 default as the last page. Then it will ask for a verification of which of the sides it is supposed to print, starting with the even page numbers. You must answer 'y' to both for a full run. I added this so that if you ran out of ink and had to restart the half done job by doing only the second, odd side so you wouldn't have to throw away whats already printed on one side. It doesn't make sense not to have the even selectable too, so it now is. Once thats done, your printer should wake up and start making copy from all the even numbered page files if the even 'Y' was entered. Your GSPage-101.out entry will start with GSPage-102 to your stopping point for the backside (first) pass. When thats done, it tells you to remove the paper from the output tray of the printer, asking for a keypress to confirm that it has been done. Then it checks to see if there is an odd numbered page file thats higher numbered than the last even number and prints that if there is such a page, and the odd 'Y' is in effect, unless that is higher than the last even stopping page. Then it tells you to put the paper stack back into the printer (while leaving that just printed page on the output tray), head end in, and in the case of a front feeder, right side up, and give it another tap of the enter key to confirm that. It then copies the odd files (if the odd 'Y' is entered) to the printer in descending order, and if running with an 000 for starting page, will end up with page one on the top of the output tray, all in order and ready to punch for a 3 ringer or folder... None of this sorting of out of order pages to be done. Notes: The amigados 'copy' which I use here, is a _*huge cpu hog*_, apparently running at priority +20 until the printer buffer is full. If anyone has such a beast that can take a lower priority option in its command line thereby giving the system back to you, I sure would apreciate hearing about it. This program will also generate a 3 byte file in the PROGRAM: directory, AKA the directory its run from, which is a linefeed + carraige return + a formfeed. I found that many printers will not accept a formfeed to eject an empty sheet of paper IF they were already sitting at the TOF position, hence the linefeed, cr and THEN the formfeed to get a blank page and stay collated correctly. This program, on finding an empty page, will substitute this 3 byte file for the empty file in the printing sequence. If you like it, give me an email at . More Money, Faster Horses, Older Whiskey and Younger Women also appreciated. In case of Younger Women, send Viagra too. :)