home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR16 / SMASHDOC.ZIP / DOCSMASH.DOC < prev    next >
Text File  |  1993-02-20  |  19KB  |  378 lines

  1.   
  2. DOCSMASH (TM) -- by David W. Rettger  
  3. ====================================  
  4.   
  5. DOCSMASH may be copied and passed to other users only if this  
  6. document file accompanies the executable program file and both  
  7. remain intact.  No party other than the author may change the  
  8. contents of these files or charge any fee for distribution (other 
  9. than a nominal sum to cover the cost of a floppy disk and mailing  
  10. fees).  
  11.   
  12. If you have benefitted from the use of DOCSMASH, please contribute  
  13. toward to costs of creating and updating this program by sending  
  14. $10.00 to:  
  15.   
  16.        David Rettger  
  17.        5304 Johnson Avenue  
  18.        Western Springs, Il. 60558  
  19.   
  20. Updated versions are not attempts to get more money from registered  
  21. users.  They are my efforts to continue to improve this program.   
  22. After registering, please feel free to use future new versions free  
  23. of charge.  If you notice that the asking price has gone up and  
  24. you feel that the additional enhancements are useful, send a  
  25. contribution for the increase only.  
  26.   
  27. =================================================================  
  28.   
  29. DOCSMASH.EXE - Version 3.2
  30.   
  31.   
  32. Purpose:  
  33. --------  
  34.   
  35. The program reduces the size of printed output on normal   
  36. 8.5 x 11 inch paper by a factor of 4.  That is to say, on a  
  37. graphics-capable printer a 200 page document will print out in 50  
  38. pages or less.  The total compression that may be achieved will be  
  39. determined by the type of hardware in use.  (My nine pin printer gets
  40. five pages of text on each sheet.)
  41.  
  42. This program is intended to print out such things as program  
  43. manuals, BBS listings, and any other ASCII TEXT.  Some users have  
  44. commented that DOCSMASH will not print out documents created by  
  45. word processors.  They are correct.  Form feed codes are the only  
  46. soft codes (tabs, margins, etc.) filtered out by DOCSMASH.  Such  
  47. codes will play havoc with the final output.  To print such text  
  48. with DOCSMASH, first resave the document in ASCii format with your  
  49. word processor.    
  50.   
  51.   
  52. Operation:  
  53. ----------  
  54.   
  55. DOCSMASH may be run from the current subdirectory or from the DOS  
  56. path.  At the DOS prompt, type the name "DOCSMASH" to begin.  The  
  57. first prompt you will see asks for the name of the document you  
  58. wish to print.  At this point you may:  
  59.   
  60.            - Type the name of a file to print.  
  61.            - Display a Help Menu  
  62.            - Change printer configuration.  
  63.            - Change screen colors.  
  64.            - Display a directory  
  65.            - Change subdirectory  
  66.            - End the DOCSMASH session.  
  67.   
  68. The alternate method of starting the program is to type DOCSMASH  
  69. followed by the path\name of the file to print.  No menu will be  
  70. shown, instead the file will be opened and the print routine will  
  71. commence as explained below. (Ex: DOCSMASH DOCSMASH.DOC will cause  
  72. the DOCSMASH.DOC file to be printed from the current subdirectory.)  
  73.   
  74. Printing a File:  
  75. ----------------  
  76.   
  77. Printing a file is as easy as typing its name.  It will then ask  
  78. if you want to begin printing at the beginning, or in the middle,  
  79. or if you wish to print something else instead.  Just hit <ENTER>  
  80. to begin the printing.  If your printer is on, it should begin  
  81. printing four pages of text per sheet of paper.  If your first run  
  82. results in strange looking output, you must change your printer  
  83. settings.  (See below.)  In the event that things are going well,  
  84. but the print job is interrupted, you may restart the print and  
  85. specify that you want to start at some middle point.  You will be  
  86. asked to type a phrase.  DOCSMASH will search the file for that  
  87. phrase and begin the printing on the line FOLLOWING the phrase.   
  88. Note: The search feature is case sensitive.  Type the phrase  
  89. exactly as you expect it to appear in the document.  
  90.   
  91. Another new feature available at this point in the program is the  
  92. option to tell the program to pause between page breaks.  This will  
  93. enable users to feed individual sheets of paper into their  
  94. printers.  More importantly, if double sided printing is desired,  
  95. turn the Page Break Pause ON by hitting <F3>.  The <F3> key will  
  96. act as an ON/OFF toggle switch whenever the "Page Break Pause"  
  97. status box is visible on the screen.  Just think of the compression  
  98. factor available here.  On wide computer paper you can get at least  
  99. six pages of text per side.  That means at least 12 pages of print  
  100. per sheet of printer paper!  (OK, so who uses wide paper.  You  
  101. probably will have to settle for eight pages of text per sheet of  
  102. paper.)   
  103.   
  104. Display the Help Menu:  
  105. ----------------------  
  106.   
  107. Hit the <F1> key to bring up a simple help menu.  It displays the  
  108. special phrases and keystrokes that DOCSMASH is looking for at this  
  109. point in the program.  Hit any key to resume.  (Note: The help menu  
  110. will not function on certain monochrome systems.  If your system  
  111. is not compatible, you will see a notice when you start DOCSMASH  
  112. that indicates that the <F1> key has been disabled.)  
  113.   
  114.   
  115. Change Printer Settings:  
  116. ------------------------  
  117.   
  118. Changing the printer settings is easy if you have an Epson  
  119. compatible printer.  Instead of typing a document name, type RESET  
  120. PARAMS (or just hit <ENTER>).  The Parameter Control Menu will  
  121. appear that shows the current settings.  These settings and the  
  122. preset defaults are:  
  123.   
  124.             Page Format Settings:  
  125.   
  126.             Print Width Setting        = 164  
  127.             Number of Columns to Print = 2  
  128.             Number of Pages Per Column = 2  
  129.             Lines Per Page Printed     = 58  
  130.             Max Blank Lines to Print   = 4  
  131.             Word Wrap Is Now           = ON
  132.   
  133.             Epson Printer Control Settings:  
  134.   
  135.             N/216th's Inch Line Feed   = 17  
  136.             Paper Length in Inches     = 11  
  137.             Left Margin Column Setting = 0  
  138.   
  139.   
  140. The group labeled "Page Format Settings" have nothing to do with  
  141. control codes sent to the printer.  They determine how the program  
  142. will layout the printing.  Print width is the number of characters  
  143. that will be printed across the entire page.  A print width setting  
  144. of 164, with 2 print columns specified will result in two 80-width  
  145. columns separated by 4 spaces.  Each column of print can be split  
  146. into multiple pages.  A setting of 2 for "Pages Per Column" results  
  147. in the four quadrant format DOCSMASH was initially designed around.   
  148. Set this value to one and you will get the most compression.   
  149. "Lines Printed Per Page" refers to the individual pages in each  
  150. column.  If a single column would be filled using a setting of 124,  
  151. then a column broken into two pages obviously would need 62 lines  
  152. per page.  To maximize compression, DOCSMASH tries to throw out  
  153. excess "White Space", blank lines of text.  The default setting  
  154. will allow up to four consecutive blank lines.  Conceivably, a zero  
  155. setting can be used, but the final output would be hard to read.   
  156. A setting of, say, 80 would most likely result in the text coming  
  157. through just as the author had typed it.  
  158.  
  159. Versions 3.2 and higher now include user contolled word wrap.  All
  160. early versions assumed that maximum compression was the ultimate goal.  In
  161. the event a text line exceeded the column print width, word wrap caused
  162. the excess length to drop down a line.  The next line was read and tacked
  163. on the same print line until the end of the column was reached.  The net
  164. effect sometimes was to entirely reformat the paragraph.
  165.  
  166. Word Wrap is now a four position "toggle switch".  The options are ON, OFF,
  167. AUTO-INDENT, and TRUNCATE.  The default position is ON, which is the
  168. method always used by DOCSMASH in the past.  Selecting OFF causes excess 
  169. line length to be placed left-margin justified on the next line.  The
  170. next read text line will print on a new line.  If the excess line length
  171. happened to be a single word, that word would appear alone on its own line.
  172. The AUTO-INDENT feature was designed with programmers in mind.  Much 
  173. source code is formatted with specific indentations from the left margin
  174. to mark blocks of codes such as loops and subroutines.  With this setting
  175. excess line length will drop to the next line, but will not be left
  176. justified.  If the line it came from began in the tenth column, the excess
  177. print will also begin in the tenth column.  No further reformatting will
  178. be done.  Both AUTO-INDENT and OFF modes will attempt to break lines 
  179. between words.  The TRUNCATE mode does just what it says.  If excess line
  180. length occurs,  it disappears from the print out.  I can not guess who would
  181. want such an option, but I am sure that if it were not included I would
  182. get all kinds of correspondence asking for it!
  183.   
  184. The second group of settings refers to the EPSON control codes sent  
  185. to the printer to achieve the "mini" print size.  The line feed  
  186. setting of 17 refers to 17/216's of an inch.  Reset this one as  
  187. desired.  The closer they are, the more you can fit on a page.   
  188. The paper length setting should match the size paper you want to  
  189. use.  The left margin setting can be adjusted in the event you  
  190. position your paper specially for certain word processors or if  
  191. you just want to punch holes in the left side of the page.  On  
  192. narrow carriage printers, a wide left margin will eat into the  
  193. width that is available for printing.    
  194.   
  195. Exiting this menu will cause the settings to be saved in a file  
  196. called DOCSMASH.CFG on the root directory of the logged drive.   
  197. Any time DOCSMASH starts on this drive, it will restore the  
  198. settings you have entered.  To get back to the defaults, delete  
  199. the \DOCSMASH.CFG file.   
  200.   
  201. As mentioned previously, the Page Format Settings control how  
  202. DOCSMASH sets up a page to be printed.  They are not printer  
  203. control codes.  The control codes sent to the printer are as  
  204. follows:  
  205.   
  206.     Code Name            Code Symbol       ASCii Representation  
  207.     ---------            -----------       --------------------   
  208.     Printer Reset         Esc @            27,64  
  209.     Elite Mode            Esc M            27,77   
  210.     Condensed Mode        Shift In         15  
  211.     Subscript Mode        Esc S 0          27,83,0  
  212.     Line Feed Width       Esc 3 n          27,51,n  *  
  213.     Left Margin           Esc l n          27,108,n  *  
  214.     Paper Length          Esc C Null n     27,67,0,n  *  
  215.   
  216.           *  "n" is a variable set by the user.  
  217.   
  218. This combination, sent in this order, is the method used to create  
  219. the small print.  The codes sent are Epson codes and will not work  
  220. on Toshiba and other printers.  Also, some Epson types will not  
  221. accept both condensed and elite modes.  If your hardware will not  
  222. go into a "mini" print mode with the above settings, you can create  
  223. your own set of printer control codes.  
  224.   
  225. Another set of printers which is not entirely compatible with these  
  226. commands are 24 pin printers.  They tend to run over to the next  
  227. page with my default settings.  The NEC P2200, for instance, does  
  228. not use the 216th's inch line feed mode.  It should be set up in  
  229. its 360th's of an inch mode as if it were a not-Epson compatible  
  230. printer.  
  231.   
  232.   
  233. Printers Not Epson Compatible:  
  234. ------------------------------  
  235.   
  236. If you intend to use a printer which is not Epson compatible (such  
  237. as Toshiba or Hewlett-Packard printers), or even some Epson  
  238. compatibles that happen to require slightly different codes, you  
  239. may customize the codes DOCSMASH will send to the printer.  When  
  240. prompted for a document name, type RESET PRINTER (or hit F5).  A  
  241. list of the codes currently in use will appear.  The top item will  
  242. be highlighted.  Use the cursor control keys to move the  
  243. highlighted bar.  The left column is a list of the codes by name.  
  244. The right column is each code represented in decimal ASCii format.  
  245.   
  246. The order the codes appear in can be changed to suit your needs, with 
  247. one exception.  The code for reset printer must be the first code, at
  248. the top of the menu.  The lines labeled "Extra" are just that, extra.
  249. They are merely place holders to show where room exists for users to
  250. enter lines of code.  If left blank, a null is sent to the printer.
  251.  
  252. Making changes to the list is easy.  To change a code label in the  
  253. left-hand column, go to the appropriate row and type the label you  
  254. want.  When you hit ENTER or move the bar, your new label will  
  255. appear in the left column.  To change the code values, simply type  
  256. the needed ASCii codes, separating each number with a comma.  Note:  
  257. You MUST use the commas to delimite ASCii numbers and do not type  
  258. any spaces!  Labels must begin with non-numeric characters.  To  
  259. entirely delete an entry, type a space.  If a mistake is made while  
  260. typing, just backspace normally.  Backspacing over an entire new  
  261. entry will bring back the original values.  
  262.   
  263. After making any changes, hit <F10> to return to the main menu.  
  264. You will be asked whether to save the changes.  If not, the changes  
  265. will remain in memory only for the current DOCSMASH session, or until you  
  266. go to the RESET PARAMS menu.  If yes, a file called DOCSMASH.PRN will be  
  267. created on the root directory of the logged drive.  As long as the .PRN  
  268. file exists, DOCSMASH will use only those printer codes in the file, not  
  269. the printer codes from the RESET PARAMS menu.  To use the codes in RESET  
  270. PARAMS, delete the .PRN file.  This is easily accomplished from within  
  271. DOCSMASH by typing the phrase "KILL PRN FILE" instead of a document name.  
  272. (Note: As mentioned before, the Print Width and Page Length, Maximum Blank 
  273.  
  274. Lines Printed, etc. settings are not printer codes, they are program  
  275. settings.  They must be set to format the output.)  
  276.   
  277. NOTE: The .PRN files created by earlier versions of DOCSMASH are  
  278. not compatible with the new versions, 3.1 and higher.  Delete the  
  279. old \DOCSMASH.PRN file before using the new version.    
  280.   
  281. Programming printer codes can be an imposing problem to non-  
  282. programmers.  A few users have taken the time to upload files  
  283. containing custom printer codes for their printers to the Orchard  
  284. Hill BBS (see below).  One such file is for the HP Laser Jet II.   
  285. If you get your printer set up properly, feel free to send me a  
  286. copy of your custom codes along with your registration fee.  If  
  287. yours is the first I receive for your type printer, I will upload  
  288. the information in a file giving you credit for the contribution.  
  289.   
  290.   
  291. Changing Screen Colors:  
  292. -----------------------  
  293.   
  294. At any time, hit <F2> to change screen colors.  A menu will appear  
  295. that shows the possible screen colors and their corresponding  
  296. numbers.  Enter a number for the foreground (text) color and the  
  297. background color.  My preference is white (15) text and blue (1)  
  298. background.  Monochrome monitor users should use a dark background  
  299. color (0).  
  300.   
  301.   
  302. Displaying a Directory:  
  303. -----------------------  
  304.   
  305. When asked for a document name, if the DOS directory command,   
  306. "DIR", is entered then the program will shell to DOS and produce  
  307. the desired directory.  Any valid drive or path may be specified  
  308. after the "DIR" command.  (This function will only work with DOS  
  309. 3.0 or higher.)  
  310.   
  311.   
  312. Changing Directories:  
  313. ------------------------  
  314. When asked for a document name, use the DOS command "CD\", followed  
  315. by any valid path name, to change to a new subdirectory. Changing  
  316. physical drives is not supported.  Printing a document on a drive  
  317. other than the logged drive may be done simply by typing the entire  
  318. file name, including the drive designation.  
  319.   
  320.   
  321. Terminating DOCSMASH:  
  322. ---------------------  
  323.   
  324. At almost any time you may hit <F10> to terminate.  If it does not  
  325. kick right out, hit <Enter>.  Apparently there are a few machines  
  326. out there that will not kick out with this command, so you also can  
  327. type the word END, instead of a document name, to quit.  
  328.   
  329. Other changes from early versions are:  
  330.   
  331. - No truncating of print that is too wide for a single line.  Long  
  332. lines will wrap to the next line.  One user decided he did not like  
  333. word wrap, that he preferred truncating a few letters.  Well, you  
  334. can't please everybody!  
  335.   
  336. - Progress reports during printing.  As pages spool to the printer,  
  337. you will see the percent of the file read reported on the screen.   
  338. Large print buffers will result in the reported number to be far  
  339. ahead of the actual printed output.  
  340.   
  341.   
  342. One final note, I have tried to make DOCSMASH as general as  
  343. possible.  With all the different hardware in use these days, it  
  344. is difficult to create a printer program that will run with  
  345. everything.  If you find that your equipment does not function  
  346. properly with this program, feel free to send a sample of the  
  347. program's output to me at the address shown above.  Please include  
  348. your name and address and the version number of the program you are  
  349. using.  If you are using your own printer codes, send that  
  350. information, too.    
  351.   
  352.   
  353. Error Codes:  
  354. ------------  
  355.   
  356. In the event that DOCSMASH encounters a problem while running,  
  357. error codes will be shown on the screen.  The manual for IBM's  
  358. BASICA or for GWBASIC lists such error codes.  You can do a certain  
  359. amount of trouble shooting for yourself by looking up the number  
  360. of the error code.    
  361.   
  362. =================================================================  
  363. Early versions of DOCSMASH were written using Borland's Turbo  
  364. Basic.  This particular version was compiled using MicroSoft's 
  365. Quick Basic.  
  366. =================================================================  
  367.   
  368. All the changes made to DOCSMASH since its debut have been the  
  369. result of comments sent to the author by users.  If you would like  
  370. to see something changed or added, or if you just wish to make a  
  371. comment about the program, you may leave a message for David  
  372. Rettger on the ORCHARD HILL BBS, phone number (708) 974-0282.  
  373. (After Dec. 15, 1989 they will have a new number, (708) 361-4547.)   
  374. Orchard Hill has DOCSMASH available to non-registered callers.   
  375. Call here for latest versions.  Also, if you are interested in an  
  376. active BBS with a service oriented SYSOP, do consider this one!    
  377.   
  378. On Compuserve, leave a message to the author, 71131,3253.