home *** CD-ROM | disk | FTP | other *** search
- 4-feb-88 - Ver 1.01 - Fixed page # bug when specifying multiple copies */
-
- Print Version 1.0 12/27/87 for Amiga DOS
- By Michael D. Black
- Copyright 1987()
-
- The executable version of this program is released to the public domain along
- with the documentation. The source code is Copyright 1987(). Source code
- shall not be distributed without prior approval.
-
- Token donations of $5.00 would be appreciated if you find this useful.
- $10.00 and an SASE & disk and you get a copy of the current version with
- source code. $20.00, SASE & disk and I will CONSIDER making customizations
- for you. If I think you want to much, you will get back the current version
- with source code, and $10 (the original $10 deal). Money received without
- SASE & disk will be considered a sincere thank-you. All correspondence can
- be sent to:
- Michael D. Black
- Attn: Print
- 1380 Croftwood Drive
- Melbourne, FL 32935-5512
-
- Suggestions will be accepted, but don't expect me to change the current
- defaults (unless there's a good reason). I may add features in the future
- as people make desires known. A workbench interface so it can replace
- 'More' might be nice for instance.
-
- I wrote this utility due to a simple need to have some formatting capability
- on text files. I found some files had tabs embedded which didn't like to
- expand on my printer. The need for titles and page numbers was there.
- I wanted a CLI interface, printer control, printer setup, formfeeds, etc.
- Other functions were desirable, but not easily available. So here it is!
- This can replace Type, typ, and a previous Print utility that was
- making the rounds, plus several others.
-
- Features:
-
- 1. Output defaults to the screen. This way you can see pretty closely
- what your output will look like. Without any options invoked, it looks
- just like 'type'. Some options (such as italics and boldface) work on the
- screen.
-
- 2. Output can be redirected via the CLI '>' to a file or to the printer.
- (Not my doing, just Amiga DOS peeking thru). A redirected file can then be
- printed and all options invoked will be used. This also means the redirected
- file can be 'typed' and boldface and italics will be used in the printout.
- This means you can also concantenate files to mix results via '>>'.
-
- 3. Tabs are expanded (defaults to 8) with spaces. They are treated as
- absolute column positions, so a tab will tab to the next tab position, not 8
- spaces from the current position.
-
- 4. The settings invoked when print is run are still active after
- completion. They have to be reset by '-mn'. This allows you to set up
- your console or printer and keep it that way if you like.
-
- 5. Print can be invoked without a filename to simply set up your printer
- to the various font modes. You can also turn italics and boldface on the
- console too. i.e 'print >prt: -c' will turn condensed printing on. Note
- that margins are done with spaces, not special printer functions. They
- have an effect only on the file(s) being printed for the one run.
-
- 6. Multiple files can be printed. They will all use the same switches.
- Page numbering will continue (not reset to 1) if multiple files are
- requested. However, if multiple copies are requested the page number will
- reset to 1 for each file and each copy requested. If you want to print
- multiple copies of files that you wish concantenated, you must invoke print
- for each copy you want.
-
- 7. The title and page numbering is a little tricky. If you provide a
- title without setting a page length, it will only print on the first page as
- the rest of the text will all run together. If you provide a page length, a
- page number will appear in the upper right corner of each page with the
- title (if provided) in front of it. If you want the title without page
- numbers, you must suppress the page numbers with '-s'. Most of the time I
- like page #'s, so that's why it defaults that way.
-
- NOTE: The -m options may not work if your printer and printer driver don't
- support them. All others should work with any printer.
-
- Usage: print [-acfhlmnoprstyz] filename [filename2,,,...]
-
- (#=number, "=string)
- Where: -a# add to starting page # ( <0 skips pages)
- -c# number of copies of each file
- -f formfeed after each file
- -h hex output
- -l# left margin
- -m" mode of print: b=boldface, c=condensed,
- d=double strike, e=elite, g=enlarged, i=italicized,
- n=normalize, p=proportional, q=NLQ, u=underline
- v=1/8\" vertical spacing
- -n numbers lines
- -o turns off the title & page# on the first page
- -p# page length
- -r# right margin
- -s suppress page numbers
- -t" title string (backslash=space, no spaces allowed)
- -y# tab stop intervals (default=8)
- -z" pause, a=after formfeed, b=before
-
- -a# : Add number to starting page number. If you wish page numbering to
- start at 5, simply say '-a5'. If you wish to skip one page and start
- printing the second page of the file (like after your paper messed up),
- use negative numbers, like '-a-1'. Page add defaults to 0.
-
- -c# : Number of copies. Will print as many copies as you specify, such as
- '-c5' will print 5 copies, and page numbers will reset to 1 for each
- copy. This causes automatic formfeed between files which you can
- suppress with '-f'.
-
- -f : Formfeed after each file (for multiple files), OR turn off formfeed if
- multiple copies were requested. There may be a case (I guess) where
- you may want multiple copies to run together, but usually I thought
- most people would want it to default to ON for that particular case.
-
- -h : Hex output. Will print a hextable with pagelength, titles,
- pagenumbers, as requested. This defaults to 3 different formats
- depending on print mode (to take advantage of the available space).
- 16 bytes per line (bpl) for Pica, 24 bpl for Elite, and 32 bpl for
- condensed. The right margin defaults to allow space for the table
- beyond the left margin, so you can overrun the right margin if you
- specify too large a left margin. Specifying the right margin can give
- you a funny looking table, but you can play with it and get decent
- output with different sizes. You can't get line numbers with this.
- If you want to have a 16 bytes table in compressed mode (for example),
- set up the printer in advance with 'print >prt: -mc' and then print
- your hex table in another command.
-
- -l# : Set left margin to number, i.e. '-l10' sets left margin at column 10.
- This does NOT use special printer functions and should work on any
- printer.
-
- -m" : Set print mode. Does exactly what the switch options say, if your
- printer supports them. You can specify more than one option, such
- as '-mbi' for boldface italics. This works as long as the
- options are not mutually exclusive, in which case the right-most
- switch will win. These modes will remain unless -mn is also selected.
- -mn by itself will ensure printer is printing in its 'normal' mode.
- -mn on a line with other -m options will reset the printer to normal
- at the end of the run.
-
- -n : Number the text lines. Does not work for hex output. Formatted for
- max of 99,999 (is that enough?). Line numbers only reset to 1 for
- multiple copies. Multiple files with single copies will count
- lines without resetting the counter between files. This is the same
- behaviour as page numbers.
-
- -o : Turns off the title & page # on the first page. Some people don't
- want it to start until the second page.
-
- -p# : Page length. Will print # lines per page. Causes page numbers to
- appear which can be suppress with '-s'. Formfeed after each page
- and prints title and page numbers as appropriate.
-
- -r# : Right margin. Sets maximum column position at which text will appear.
- Will affect hex output (screw it up). This is relative to the left
- edge of the paper, not the left margin.
-
- -s : Suppress page numbers. Necessary if you don't want page numbers to
- appear when page length ('-p') is set.
-
- -t" : Title string. No spaces are allowed, so you can create a space with a
- backslash '\' character.
-
- -y# : Set tab stop intervals. Defaults to 8. This is done with spaces, not
- with special printer functions. Should always work.
-
- -z : Pause before ('-zb') or after ('-za') formfeeds. If you want to print
- something to console, and have it pause between pages, you can do
- something like 'print -zb -p20 print.doc'. This will print 20 lines
- and wait for a key to be pressed. No prompt is provided, as you may
- want to use this option for using special paper on your printer. So,
- if your using single sheets, you can try 'print -za -p60 print.doc'.
- This will formfeed and then wait for a key press. Handy for sticking
- in the next sheet of paper.
-
-
-