home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 118.lha / print.doc < prev    next >
Text File  |  1986-11-20  |  9KB  |  179 lines

  1. 4-feb-88 - Ver 1.01 - Fixed page # bug when specifying multiple copies */
  2.  
  3. Print Version 1.0 12/27/87 for Amiga DOS
  4. By Michael D. Black
  5. Copyright 1987()
  6.  
  7. The executable version of this program is released to the public domain along
  8. with the documentation.  The source code is Copyright 1987().  Source code
  9. shall not be distributed without prior approval.
  10.  
  11. Token donations of $5.00 would be appreciated if you find this useful.
  12. $10.00 and an SASE & disk and you get a copy of the current version with
  13. source code.  $20.00, SASE & disk and I will CONSIDER making customizations
  14. for you.  If I think you want to much, you will get back the current version
  15. with source code, and $10 (the original $10 deal).  Money received without
  16. SASE & disk will be considered a sincere thank-you.  All correspondence can
  17. be sent to:
  18.                Michael D. Black
  19.                Attn: Print
  20.                1380 Croftwood Drive
  21.                Melbourne, FL 32935-5512
  22.  
  23. Suggestions will be accepted, but don't expect me to change the current
  24. defaults (unless there's a good reason).  I may add features in the future
  25. as people make desires known.  A workbench interface so it can replace
  26. 'More' might be nice for instance.
  27.  
  28. I wrote this utility due to a simple need to have some formatting capability
  29. on text files.  I found some files had tabs embedded which didn't like to
  30. expand on my printer.  The need for titles and page numbers was there.
  31. I wanted a CLI interface, printer control, printer setup, formfeeds, etc.
  32. Other functions were desirable, but not easily available.  So here it is!
  33. This can replace Type, typ, and a previous Print utility that was
  34. making the rounds, plus several others.
  35.  
  36. Features:
  37.  
  38.    1.  Output defaults to the screen.  This way you can see pretty closely
  39. what your output will look like.  Without any options invoked, it looks
  40. just like 'type'.  Some options (such as italics and boldface) work on the
  41. screen.
  42.  
  43.    2.  Output can be redirected via the CLI '>' to a file or to the printer.
  44. (Not my doing, just Amiga DOS peeking thru).  A redirected file can then be
  45. printed and all options invoked will be used.  This also means the redirected
  46. file can be 'typed' and boldface and italics  will be used in the printout.
  47. This means you can also concantenate files to mix results via '>>'.
  48.  
  49.    3.  Tabs are expanded (defaults to 8) with spaces.  They are treated as
  50. absolute column positions, so a tab will tab to the next tab position, not 8
  51. spaces from the current position.
  52.  
  53.    4.  The settings invoked when print is run are still active after
  54. completion.  They have to be reset by '-mn'.  This allows you to set up
  55. your console or printer and keep it that way if you like.
  56.  
  57.    5.  Print can be invoked without a filename to simply set up your printer
  58. to the various font modes.  You can also turn italics and boldface on the
  59. console too.  i.e 'print >prt: -c' will turn condensed printing on.  Note
  60. that margins are done with spaces, not special printer functions.  They
  61. have an effect only on the file(s) being printed for the one run.
  62.  
  63.    6.  Multiple files can be printed.  They will all use the same switches.
  64. Page numbering will continue (not reset to 1) if multiple files are
  65. requested.  However, if multiple copies are requested the page number will
  66. reset to 1 for each file and each copy requested.  If you want to print
  67. multiple copies of files that you wish concantenated, you must invoke print
  68. for each copy you want.
  69.  
  70.    7.  The title and page numbering is a little tricky.  If you provide a
  71. title without setting a page length, it will only print on the first page as
  72. the rest of the text will all run together.  If you provide a page length, a
  73. page number will appear in the upper right corner of each page with the
  74. title (if provided) in front of it.  If you want the title without page
  75. numbers, you must suppress the page numbers with '-s'.  Most of the time I
  76. like page #'s, so that's why it defaults that way.
  77.  
  78. NOTE:  The -m options may not work if your printer and printer driver don't
  79. support them.  All others should work with any printer.
  80.  
  81. Usage: print [-acfhlmnoprstyz] filename [filename2,,,...]
  82.  
  83.            (#=number, "=string)
  84. Where: -a# add to starting page # ( <0 skips pages)
  85.        -c# number of copies of each file
  86.        -f  formfeed after each file
  87.        -h  hex output
  88.        -l# left margin
  89.        -m" mode of print: b=boldface, c=condensed,
  90.            d=double strike, e=elite, g=enlarged, i=italicized,
  91.            n=normalize, p=proportional, q=NLQ, u=underline
  92.            v=1/8\" vertical spacing
  93.        -n  numbers lines
  94.        -o  turns off the title & page# on the first page
  95.        -p# page length
  96.        -r# right margin
  97.        -s  suppress page numbers
  98.        -t" title string (backslash=space, no spaces allowed)
  99.        -y# tab stop intervals (default=8)
  100.        -z" pause, a=after formfeed, b=before
  101.  
  102. -a# : Add number to starting page number.  If you wish page numbering to
  103.       start at 5, simply say '-a5'.  If you wish to skip one page and start
  104.       printing the second page of the file (like after your paper messed up),
  105.       use negative numbers, like '-a-1'.  Page add defaults to 0.
  106.  
  107. -c# : Number of copies.  Will print as many copies as you specify, such as
  108.       '-c5' will print 5 copies, and page numbers will reset to 1 for each
  109.       copy.  This causes automatic formfeed between files which you can
  110.       suppress with '-f'.
  111.  
  112. -f  : Formfeed after each file (for multiple files), OR turn off formfeed if
  113.       multiple copies were requested.  There may be a case (I guess) where
  114.       you may want multiple copies to run together, but usually I thought
  115.       most people would want it to default to ON for that particular case.
  116.  
  117. -h  : Hex output.  Will print a hextable with pagelength, titles,
  118.       pagenumbers, as requested.  This defaults to 3 different formats
  119.       depending on print mode (to take advantage of the available space).
  120.       16 bytes per line (bpl) for Pica, 24 bpl for Elite, and 32 bpl for
  121.       condensed.  The right margin defaults to allow space for the table
  122.       beyond the left margin, so you can overrun the right margin if you
  123.       specify too large a left margin.  Specifying the right margin can give
  124.       you a funny looking table, but you can play with it and get decent
  125.       output with different sizes.  You can't get line numbers with this.
  126.       If you want to have a 16 bytes table in compressed mode (for example),
  127.       set up the printer in advance with 'print >prt: -mc' and then print
  128.       your hex table in another command.
  129.  
  130. -l# : Set left margin to number, i.e. '-l10' sets left margin at column 10.
  131.       This does NOT use special printer functions and should work on any
  132.       printer.
  133.  
  134. -m" : Set print mode.  Does exactly what the switch options say, if your
  135.       printer supports them.  You can specify more than one option, such
  136.       as '-mbi' for boldface italics.  This works as long as the
  137.       options are not mutually exclusive, in which case the right-most
  138.       switch will win.  These modes will remain unless -mn is also selected.
  139.       -mn by itself will ensure printer is printing in its 'normal' mode.
  140.       -mn on a line with other -m options will reset the printer to normal
  141.       at the end of the run.
  142.  
  143. -n  : Number the text lines.  Does not work for hex output.  Formatted for
  144.       max of 99,999 (is that enough?).  Line numbers only reset to 1 for
  145.       multiple copies.  Multiple files with single copies will count
  146.       lines without resetting the counter between files.  This is the same
  147.       behaviour as page numbers.
  148.  
  149. -o  : Turns off the title & page # on the first page.  Some people don't
  150.       want it to start until the second page.
  151.  
  152. -p# : Page length.  Will print # lines per page.  Causes page numbers to
  153.       appear which can be suppress with '-s'.  Formfeed after each page
  154.       and prints title and page numbers as appropriate.
  155.  
  156. -r# : Right margin.  Sets maximum column position at which text will appear.
  157.       Will affect hex output (screw it up).  This is relative to the left
  158.       edge of the paper, not the left margin.
  159.  
  160. -s  : Suppress page numbers.  Necessary if you don't want page numbers to
  161.       appear when page length ('-p') is set.
  162.  
  163. -t" : Title string.  No spaces are allowed, so you can create a space with a
  164.        backslash '\' character.
  165.  
  166. -y# : Set tab stop intervals.  Defaults to 8.  This is done with spaces, not
  167.       with special printer functions.  Should always work.
  168.  
  169. -z  : Pause before ('-zb') or after ('-za') formfeeds.  If you want to print
  170.       something to console, and have it pause between pages, you can do
  171.       something like 'print -zb -p20 print.doc'.  This will print 20 lines
  172.       and wait for a key to be pressed.  No prompt is provided, as you may
  173.       want to use this option for using special paper on your printer.  So,
  174.       if your using single sheets, you can try 'print -za -p60 print.doc'.
  175.       This will formfeed and then wait for a key press.  Handy for sticking
  176.       in the next sheet of paper.
  177.  
  178.  
  179.