Postscript Deskjet (Plus, 500) printing driver (PostDJ, with Post V1.6) ======================================================================= Eric Kennedy Based heavily on PostLJ, Copyright Adrian Aylward 1990, 1991. This documentation adapted from Adrian Aylward's documentation for PostLJ. You may freely copy, use and modify this program (postdj). The source is included in the distribution. The program calls the PostScript interpreter library to render a series of PostScript files to Deskjet printer connected to the parallel port. It supports all the possible page sizes, i portrait or landscape orientation. It has been tested on a Deskjet Plus. It will likely work with the other current models in the Deskjet family or emulations thereof. It is run from the CLI command line. There is no workbench startup. The CLI interface is very simple. No attempt has been made to provide fancy keywords for the options; if you can't remember them write yourself a script. There are no status checks on the printer device, so it the output hangs check that your printer is plugged in and switched on. Is is advisable to switch the printer on before starting, otherwise the first few characters may be lost, and the printout corrupted. Changes from PostLJ =================== Two new options, -x and -y have been added. -xnn shifts the image left nn pixels; -ymm shifts the image up mm pixels. The data contained in the leftmost nn pixels and the topmost mm pixels is simply discarded, as the Deskjet is not capable of printing in those regions. Default is -x75 -y24, as these settings have provided the best printouts on my Deskjet Plus. This shifts the printout left 0.25" and up 0.08". You may need to experiment to find the best values for your printer and software. Certain options in PostLJ that pertain to the Laserjet but are not applicable to the DeskJet (such as number of copies) have simply been left alone. I think the Deskjet ignores them anyway. Note that PostDJ does nothing to correct for the dead space at the bottom of the page. If your image runs onto the bottom 0.25" or so, it will spill over onto the next page. Just keep in mind the printable area of the Deskjet when you are composing your page, and you'll be fine. The -xnn shift is not precise. PostDJ rounds the nn parameter to the nearest multiple of 8. Thus, to achieve a 0.25" shift, the image is actually shifted 72 pixels, or 0.24". In my experience, this error is smaller than the slop inherent in the Deskjet paper handling, anyway, so I opted not to dive in and twiddle all the bits necessary to shift the page a fraction of a byte. It is possible to specify values for -x or -y larger than the size of the output page. In this case, a blank page will be printed. If you get blank pages, run postdj with -x0 -y0 to make sure there is something there to print. Usage ===== postband [-options ...] [files...] [TO tofile] [MEM fhlv..] The filename defaults to "par:" the parallel device handler. You can specify an alternative name if you want to save the output in a file, or send it to a different handler. The options are indicated by an initial "-". They are single letters, followed by a numeric value. page size s0 legal s1 letter s2 executive *s3 A4 (default) s4 COM-10 s5 monarch s6 C5 s7 DL page orientation *l0 portrait (default) l1 landscape begin printing at page number *b0 all pages b999 any value from 1 to 9999 end printing at page number *e0 all pages e999 any value from 1 to 9999 number of copies *n0 use #copies, or 1 if zero or more than 99 (default). n99 any value from 1 to 99 graphics compression c0 disabled c1 enabled (default) Horizontal shift x75 shift left 0.25" (default) xnn shift left any value from 0 to 10000 Vertical shift y24 shift up 0.08" (default) xmm shift left any value from 0 to 10000 If you have an earlier model Deskjet that does not support graphics compression (the original model, I think) you must disable it. The "files..." are the PostScript files to be interpreted. Usually these will be the standard startup "init.ps" followed the by file you wish to print. The TO filename defaults to "par:" the parallel device handler. You can specify an alternative name if you want to save the output in a file, or send it to a different handler. The MEM options are passed directly to Post. Up to 5 are allowed; later values override earlier values. See the file post.doc for details. For example, to print pages 10 through 15 (inclusive) of a document on a Deskjet connected to the serial port, in letter format, landscape orientation: postdj-s1 -l1 -b10e15 init.ps doc.ps to ser: A more common invocation of postdj would be postdj -s1 init.ps doc.ps to par: This assumes american-style 8.5"x11" paper, and the deskjet attached to the parallel port.