

                           DJ2SIDE.EXE
                    Copyright 1993 Warrick Wilson


Features
~~~~~~~~

- two-sided printing on your DeskJet printer
- offset pages to allow for three-hole punching - great for
  documentation that comes with shareware (like this file!)
- automatic recognition of paginated documents (containing
  formfeed characters)
- user-specified header, footer and line widths for printing files
  without formfeeds
- select either LPT1, LPT2, or LPT3

System Requirements
~~~~~~~~~~~~~~~~~~~

DJ2SIDE will work with any DOS system and DeskJet printer.  You
need at least one and a half times as much disk space as the file
you are printing occupies.  (e.g. a 100K file needs another 150K or
so to print)


Licensing
~~~~~~~~~

        The programs and documentation in this archive are
            Copyright (c) 1993 by Warrick Wilson

DJ2SIDE is a shareware utility. This means that you only pay for it
if you decide to continue using it.  If you don't think that it is
worth the asking price, delete the program, or better yet give it to
someone who might find it useful.  However if you do decide to keep
DJ2SIDE after a 2 week trial period, please send a cheque for the
appropriate registration amount (see REGISTRATION FORM on next page)
to:

           Warrick Wilson
           98 Nipigon Street
           Kitchener, Ontario
           Canada  N2B 3N7
           519-571-1690

The shareware fee pays for unlimited use of DJ2SIDE by a single
person.  You are allowed (and encouraged) to give away copies of
DJ2SIDE with the understanding that each person receiving a copy is
under the same obligation as you are to send in the shareware fee if
they decide to keep it.  You can upload DJ2SIDE to other computer 
systems, either free or commercial, as long as this archive remains 
intact, with the copyright and shareware notices unchanged.

No guarantee is made as to the functionality of this software;
however it has been tested as thoroughly as possible.  If it doesn't
do what you want, don't keep it and send no money.  If you do find a
problem, I'd appreciate hearing about it.

Please support the shareware concept.  Shareware means useful
programs at a fraction of the cost you might pay for them
commercially.  You can try-before-you-buy, and you are not subjected 
to copy protection or other atrocities that many software vendors 
inflict on their customers.  Software updates can also be distributed 
much faster than is possible through normal channels.

Any questions, suggestions, or bug reports, can be mailed to the
above address.  It's my home phone number, so you can call, but
please call between 6 p.m. and 9 p.m. Eastern time.  There's usually
an answering machine on during the day, so you can leave a message.

Enjoy,

Warrick Wilson


What does DJ2SIDE do?
~~~~~~~~~~~~~~~~~~~~~

I got fed up with printing all my documents on one side of the page.  
Not only does it cost a lot for the paper, but you have to store the 
output somewhere!  I figured that if I could print on both sides, 
I'd save space as well as money.

DJ2SIDE is the result.  It prints text files, using an HP DeskJet, on
both sides of the page.  It tries to figure out whether the file
already has formfeeds delimiting the pages.  If it finds formfeeds in
a document, it just sends that document to the printer.  If there are
no formfeeds, then DJ2SIDE will paginate the document for you.

Most shareware text files (like this one) don't have enough space at
the left side of the page for three-hole punching.  DJ2SIDE lets you
add spaces to the front of the line on facing (odd) pages for this
purpose.

The other neat thing that DJ2SIDE does is print the pages out in
reverse order, so that the first page of the first document you
specified ends up on top.  No more DeskJet Output Shuffle!!

DJ2SIDE attempts to monitor the printer status to recognize paper out
and offline conditions.  I've done the best I can do, but I suppose
this area oculd be improved if people recognize a need.


What Doesn't DJ2SIDE do?
~~~~~~~~~~~~~~~~~~~~~~~~

DJ2SIDE is NOT an editor, a word processor, or a pretty printer.  It
just takes the documents you specify and tries to print them on both
sides of the page.  It will no reformat paragraphs, number pages,
adjust your printer settings, or do any of that other fancy stuff.
At least, not now.  Given enough requests for this type of facility, 
I could always add it in.  I haven't really needed it so far, which 
is why that feature isn't in.  If you really want it, let me know.  
Even better, register your copy and include your request in with 
your registration!

DJ2SIDE has no way of printing a subset of a document.  That is a 
future plan.  I'll implement that once I notice a lot of problems in 
printing documents out, or when I get a lot of requests for it.


DJ2SIDE Overview
~~~~~~~~~~~~~~~~

DJ2SIDE takes some (optional) control parameters and a list of 
documents to be printed.  You should first set up your printer in 
any particular printing mode (e.g. condensed print) before running 
the program.  Once the program is running, DJ2SIDE displays the 
current document being processed, and a running total of the number 
of pages processed and the number of physical pages of output that
will be produced.

DJ2SIDE creates some temporary files on your disk.  You need about
one and one-half times extra space above the total space taken by
your documents.  If you specify 100K of documents to print, you need
about 150K free disk space.  DJ2SIDE makes files of the "fronts" and
"backs" of the pages to print.

Once all the documents have been processed, DJ2SIDE begins printing
the "backs", or even pages.  Once these pages have been sent to the
printer, you receive a prompt to prepare the printer to print the
"fronts", or odd pages.  DO NOT REMOVE ANY PAGES FROM THE OUTPUT
TRAY UNTIL THE PRINTING OF THE BACKS HAS FINISHED!!!

Once the printing stops, take the pages from the output tray and
"spin" them 180 degrees.  Put them back in the input tray on the
DeskJet.  This step puts the head of the page back into the printer,
with the text just printed on the top of the page.  This sets the
pages up to print the fronts.  The fronts are printed in reverse
order, so that the first page of the first document appears on top
of the pile of output when all documents have printed.

The best way to get used to the idea is to try it on a few small
documents initially.  If you forget to spin the output, you will end
up with "tumbled" output - you need to lift the page from bottom to
top to read the back properly.  This is useful if you have special
folders where pages are punched at the top.



DJ2SIDE Terminology
~~~~~~~~~~~~~~~~~~~

I had to adopt some standard terms in order to think about this
program properly.  Here's an explanation of the terms:


FRONT    Typically an odd-numbered page (since most documents start
         at page 1).  The only time this is not true is in documents
         that have a title page or table of contents, and are
         automatically numbered by a word processor.


BACK     Typically an even-numbered page.  You need to turn or lift
         a page to look at the back.





DJ2SIDE Options
~~~~~~~~~~~~~~~

Start DJ2SIDE by typing  DJ2SIDE  and pressing Enter.  This will
give you a brief description of the program.

Typing   DJ2SIDE ?  and pressing Enter will give a brief list of the
options you can specify for DJ2SIDE.  This section discusses the
options in more detail.

These options allow you to configure DJ2SIDE to most printing needs.
Note that the options take effect for your entire session, so only
print those files that require a given set of options.  You may
enter the options in any order on the command line.


   Option   Purpose
   ------   --------------------------------------------------------
   -ob      Print only the backs of the document.  The paper must be
            placed correctly in the input tray for this to work
            properly.  Again, experimentation is probably best.

   -of      Print only the fronts of the document.  The paper must be
            placed correctly in the input tray for this to work
            properly.  Again, experimentation is probably best.
            This option is most useful when you notice that the top
            page misfeeds as the fronts start printing.

   NOTE:    for these options, only the FIRST specified will be
            used.


   Option   Purpose
   ------   --------------------------------------------------------
   -bnn     Number of blanks to put at the start of odd numbered
            pages (fronts) to increase the left margin for punching

            e.g. -b5 will shift the fronts of the pages 5 characters
                 to the left.

   -c       Suppresses addition of carriage return at the end of the
            line.  This will likely be more useful when I support
            other printer types, but I added it during testing to
            accommodate some special problems I encountered.

   -fnn     Number of footer lines to allow (default is 3)
            This value is effective ONLY in documents that do not
            have form feed characters already.

            e.g.  -f4 allows 4 lines at the bottom of each page

   -hnn     Number of header lines to allow (default is 3)
            This value is effective ONLY in documents that do not
            have form feed characters already.

            e.g.  -h4 allows 4 lines at the top of each page


DJ2SIDE Options (cont'd)
~~~~~~~~~~~~~~~~~~~~~~~~

   Option   Purpose
   ------   --------------------------------------------------------
   -lnn     Page length in lines (default is 66)

   -mnn     Number of blanks to add to left margin on ALL pages.

            e.g.  -m5  add 5 spaces to the start of each line

            This option is useful for shareware documentation like
            this file, that have a 70 character per line limit.
            Using a  -m5  option will leave a 5 character left
            margin on ALL pages.

   -n       DO NOT reverse the pages

   -pn      LPT port to use (1, 2 or 3) (default is 1)

            e.g.  -p2  sends output to LPT2:

   -txx     Type of printer.  Default is DeskJet.  Currently, this
            is the only option recognized.  As more printers are
            supported (I'm working on it), then this parameter will
            be more useful.

Example:
~~~~~~~~

This document is formatted at 70 characters per line, with embedded
formfeed characters.  You can print this out on both sides so that
there is a 5 character margin on both sides by using the command

        dj2side -m5 dj2side.txt


WARNING
~~~~~~~

DJ2SIDE does NOT do any printer setup!  You HAVE to put the printer
into the proper mode BEFORE you start printing.  I intend to put 
some controls into later versions to help this along, but for now, 
SET THE DESKJET PRINTER UP FIRST!



DJ2SIDE REGISTRATION FORM
===========================

Registration Information (What do I get if I register!)
~~~~~~~~~~~~~~~~~~~~~~~~

All registered users of DJ2SIDE will receive one update with the
most recent version of the program.  Subsequent updates are available
for $3.00 shipping and handling on request.




TO:                      FROM:

Warrick Wilson              Name: ___________________________________
98 Nipigon Street
Kitchener, Ontario     (Company): ___________________________________
Canada, N2B 3N7
519-571-1690             (Title): ___________________________________

                         Address: ___________________________________

                      City,State: ___________________________________
                          (Prov.)

                       Telephone: ___________________________________



DJ2SIDE Price Schedule
~~~~~~~~~~~~~~~~~~~~~~

1-9   copies  - $15 per copy
10-49 copies  - $12 per copy
50-99 copies  - $10 per copy
100+  copies  - One time fee of $1000


Canadian Residents - please send Canadian Funds
All Others         - prices are U.S. dollars


I WOULD LIKE TO REGISTER:

   ____ copies of DJ2SIDE V1.0  X  $______  per copy      = $________



                                          TOTAL ENCLOSED = $
                                                             ========



Signature: ____________________________________



Update Log
~~~~~~~~~~

Version 1.0 (released February 1993)
   - initial release


Planned Enhancements
~~~~~~~~~~~~~~~~~~~~

I have a list of possible enhancements, plus I'm always open to
suggestions.  If you have any, drop me a line and let me know of
your ideas.

- support double-sided printing on LaserJet and dot matrix printers
- see if I can do the same thing under Windows (this may be a long
  term project!)
- include some formatting routines to reformat a document to fit the
  user's margins and line widths
- allow selective printing of a range of pages to recover from 
  printer misfeeds
- better support for monitoring printer status
- printer control via command line options 
  (draft mode, line width, etc.)
