home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / printer / multipri.lha / MultiPrint.doc < prev    next >
Text File  |  1993-02-24  |  21KB  |  576 lines

  1. {\Centre}
  2. {\Bold +}
  3.                          MultiPrint V1.3 - Manual
  4.                                John Matthews
  5.                               24 February 1993
  6. {\B -}                                       
  7.  
  8. NAME
  9. ----
  10.  
  11. MultiPrint
  12.  
  13. SYNOPSIS
  14. --------
  15. {\Reformat -}
  16. {\Justify -}
  17.     MultiPrint <args>
  18.  
  19.       File/A/M
  20.          :  Text file(s), to print and scripts of files to print.
  21.             Can also include layout commands. See Later.
  22.  
  23.       TabSize/N/K
  24.          :  Number of positions to expand tabs to, default is 8.
  25.             This is only used when there is no justification, and
  26.             paragraph reformatting is off.
  27.  
  28.       FF/S
  29.          :  Pay attention to FormFeed characters. Starts new pages on a
  30.             new column.
  31.  
  32.       Sides/S
  33.          :  Print to both sides of a sheet. Only useful with cut-sheet
  34.             feeder type printers, laser jets, HP Deskjets etc.
  35.             See note on 'Last Page'.
  36.  
  37.       Font/K
  38.          :  Name of font to use for text, defaults to LetterGothic.font
  39.             See notes later on font usage.
  40.  
  41.       Size/K/N
  42.          :  Point size of font, or pixel size if PxlFontSize specified.
  43.             Defaults to 8 points (1/72ndsof an inch, ie 9 lines per inch)
  44.             or 8 pixels (real small, smaller at higher printer resolutions)
  45.             if you use Pxls.
  46.  
  47.       LineSpace/K/N
  48.          :  Point/Pixel size of each line to print. ie Use twice the font size
  49.             for double spacing.
  50.  
  51.       Columns/K/N
  52.          :  Number of columns to print, 1..8. Defaults to 2.
  53.  
  54.       Gutter/K/N
  55.          :  How many 1/10ths of an inch to leave at the left of odd, and
  56.             the right of even pages. Defaults to 5, ie half an inch
  57.  
  58.       OddFooter/K
  59.          :  Footer for odd pages, defaults to file name
  60.  
  61.       EvenFooter/K
  62.          :  Footer for even pages, defaults to file name
  63.  
  64.       FooterFont/K
  65.          :  Name of font for footers, defaults to same as Font
  66.  
  67.       FooterSize/K
  68.          :  Point size of footer font, or pixel size if PxlFontSize
  69.             specified. Specifying 0 causes MultiPrint to not print
  70.             a footer, which includes page numbering.
  71.             Defaults to 14 points (1/72ndsof an inch)
  72.             or 14 pixels (real small) if you use Pxls
  73.  
  74.       Check/S
  75.          :  Causes MultiPrint to do a 'dry run'. No printing occurs,
  76.             but lines that are too long for the point size / number of
  77.             columns combination are reported.
  78.             NOTE: Only use this if you are trying to print a document
  79.                   with no paragraph reformating and/or justification.
  80.  
  81.       Pxls/S
  82.          :  Causes MultiPrint to treat font sizes as absolute pixel height,
  83.             instead of point sizes. This method is dependant on the
  84.             resolution of the printer, but is necessary for use with
  85.             non-scalable fonts. If you specify this flag, you should not
  86.             use the default font sizes.
  87.  
  88.       Priority/K/N
  89.          :  Specifies the priority to run the spooler task at
  90.  
  91.       Ask/S
  92.          :  Prompt for confirmation of each file to print
  93.  
  94.       Quiet/S
  95.          :  No error messages for unfound files.
  96.  
  97.       Margin/K/N
  98.          :  Space in 10ths of an inch to leave between columns.
  99.             Defaults to 1 tenth of an inch.
  100.  
  101.       Line/S
  102.          :  Causes MultiPrint to draw a line between columns
  103.  
  104.       Reformat/S
  105.          :  Causes MultiPrint to reformat the documents into paragraphs
  106.             as they are printed. See Later.
  107.  
  108.       Start/K/N,
  109.       End/K/N
  110.          :  Specifies which page to start/end printing on. Remember that
  111.             many parameters effect page layout, such a font, font size,
  112.             resolution, number of columns, footers etc
  113.  
  114.       Density/K/N
  115.          :  Specifies the preferences density to use when printing,
  116.             range 1..7. If you specify 0, you will be prompted with the
  117.             dots per inch of each density. Not specifying density
  118.             causes MultiPrint to use the current preferences density.
  119.             See note on resolution later.
  120.  
  121.       LE/K/N,
  122.       RE/K/N
  123.          :  Specify edges of printable area, in _millimetres_ for
  124.             greater accuracy. This is the only parametre specified
  125.             in millimetres.
  126.             Use 3 and 10 respectively on DeskJet 500s.
  127.             See important notes on Page Usage and Environment Variables.
  128.  
  129. {\Reformat =}
  130. {\Justify =}
  131.  
  132. DESCRIPTION
  133. -----------
  134.  
  135. MultiPrint is a program for printing text files to both sides of a page,
  136. in  multiple columns, and very small, or very large, high quality fonts.
  137.  
  138. MultiPrint makes use of many Amiga OS Release 2.04 features, and so
  139. requires at least this revision of the operating system. These features
  140. include Compugraphic Scalable Font technology, to produce characters to
  141. the correct size at the full resolution of the, printer, and the correct
  142. aspect ratios.
  143.  
  144.  
  145.  
  146. SOURCE
  147. ------
  148.  
  149. The source code is not included, but is available from the author.
  150. MultiPrint was writtern in M2Sprint Modula2, but should be easy to port to
  151. other languages if desired.
  152.                                        
  153.  
  154. COPYRIGHT
  155. ---------
  156.  
  157. MultiPrint V1.3 is freely distributable. MultiPrint V1.3 is free to be
  158. spread on public-domain and shareware disks especially on Fred Fish's
  159. AmigaLibDisks, as long as they are sold for a reasonable charge that is
  160. less than US $6 or equivalents. For use in commercial products the
  161. permission of the author is required. MultiPrint V1.3 may be copied and
  162. distributed via electronic networks such as the Internet, also it may be
  163. held available on anonymous ftp-servers, mail-boxes or BBS's. The
  164. Copyright is still held by the Author.
  165.  
  166. I am offering MultiPrint as shareware. If you use it regularly, let me
  167. know. No obligations.
  168.  
  169. However, if you want to use it for some commercial project/product, please
  170. make it up to me somehow.
  171.  
  172. If you need some modifications done, offer me some incentive.
  173.  
  174. NO MATTER WHAT -
  175.  Leave the program as is, and documentation intact.
  176.  
  177. AUTHOR & SUPPORT
  178. ----------------
  179.  
  180. {\Centre +}
  181.     John Matthews
  182.     4 Wadham Grove,
  183.     Tawa, 6203
  184.     Wellington,
  185.     New Zealand.
  186.     INTERNET: tribble@gphs.vuw.ac.nz
  187.     (Irregular monitoring)
  188. {\Justify =}
  189.  
  190. Support may be limited to an attempt to fix any bugs which may be found,
  191. no promises. The author takes no liability for any damage caused by
  192. the program, but then, neither does he expect any.
  193.  
  194. Try the program out a few times before leaving it to print a large
  195. document unattended.
  196.  
  197. Leave me a message if you have any suggestions
  198.  
  199. CHANGES
  200. -------
  201.  
  202. 1.0 First Release, sort of. Was never really released
  203.     (29-Jan-93)
  204. 1.1 Second (attempt at a) Release.
  205.     Added support for multiple files and scripts.
  206.     (4-Feb-93)
  207. 1.2 Third ( attempt at a ) Release.
  208.     Added :
  209.       1. Right Justification.
  210.       2. Paragraph reformating.
  211.       3. Margins and Lines between columns.
  212.       4. Start/End page printing (for aborted print jobs)
  213.       5. Density setting.
  214. 1.3 Fourth ( (and successful) attempt at a ) Release.
  215.     Added
  216.       1. Environment variable
  217.       2. LE and RE, to align columns on both sides of page.
  218.       3. Break commands
  219.     
  220. 2.0 (Planned) Workbench interface. Drop and go operation and more.
  221.  
  222.  
  223.  
  224. PURPOSE & THEORY
  225. ----------------
  226.  
  227. MultiPrint was designed to print text files to as few pages as possible.
  228. You know how sometimes having a .doc file is not good enough, you need to
  229. be able to see it on paper, because you are always referring to it. Or you
  230. have a really neat StarTrek© parody you want to show someone.
  231.  
  232. MultiPrint can print using multiple columns, both sides of a page, with
  233. really small, but still high resolution fonts to fit many times the usual
  234. amount on a page.
  235.  
  236. For example, an A4 page can usually hold about 60 lines of text. With
  237. MultiPrint and an 7 point font (about 30 pixels high on a 300dpi laser or
  238. deskjet) giving 100 lines of text, with 2 columns of output to both sides
  239. of the page gives 100 * 2 * 2 = 400 lines per page.
  240.  
  241. MultiPrint uses whichever font you specify, and can handle narrow and
  242. proportional fonts to increase the number of columns you can print. Lines
  243. can be wrapped around and right justified for improved use of space and
  244. readability, producing newspaper like output.
  245.  
  246. MultiPrint allows a gutter for stapling sheets together. The default of
  247. 5/10ths of an inch is quite adequate.
  248.  
  249. MultiPrint determines page size, and resolution from the system. Page
  250. oriented printers such as laser printers and Hewlett Packard DeskJets
  251. specify their resolutions directly. Tractor feed etc printers must have
  252. their lines/inch and number-of-lines set correctly to reflect page length,
  253. but they don't work so well for both sides printing anyway.
  254.  
  255. MultiPrint queues the pages, and uses a child process to print the even
  256. pages first in ascending order, then the odd pages in descending order on
  257. the reverse sides.
  258.  
  259. Due to the queueing of pages, MultiPrint can use a certain amount of
  260. memory. All pages are stored in memory as they are processed, also the
  261. program requires a buffer for processing the pages. Text files don't
  262. usually get large enough for this to be a problem on most systems these
  263. days, and this is faster and easier than spooling off to disk again.
  264.  
  265.  
  266. VERSION
  267. -------
  268.  
  269. This is version 1.3 of MultiPrint. It does everything I need, but I would
  270. like to give it a nice Workbench interface. This may, however, take time.
  271.  
  272. If anyone has any need for features other than those present, let me know,
  273. and maybe offer suitable inducements :-)
  274.  
  275.  
  276. STARTING
  277. --------
  278.  
  279. MultiPrint is a Shell/CLI only program, and requires at least version 2.04
  280. of the Amiga OS. All parameters, as described above, except for the file
  281. name, have defaults and require keyword specifications to override them.
  282.  
  283. MultiPrint runs at a default priority of -1, as a good printing utility
  284. should, though this can be changed with the priority keyword. Priority is
  285. not overly important in some respects, however, as MultiPrint does not
  286. busy-wait. If your computer is fast enough, and/or so is your printer
  287. driver, you could well be waiting on your printer. Laser printers however
  288. will more likely be waiting on the computer, and so MultiPrint will be
  289. grabbing every available cycle, so leave at a low priority for background
  290. printing.
  291.  
  292. Before printing a file, it may be a good idea to use the "Check" option to
  293. determine how much line wrapping is occuring. Modern fonts are variously
  294. weighted. A good, light proportional font can fit many more characters on
  295. average than a heavy non-proportional font, so check if the current number
  296. of columns and font size will avoid line wrapping. Too much line-wrapping
  297. and you may end up wasting space with mostly blank lines.
  298.  
  299. MultiPrint can be stopped at any time with a <CTRL>-C, or the break
  300. command. It runs unattended until the midway point, if you have specified
  301. the "Sides" option. In this case, when it finishes printing the even pages,
  302. a prompt will appear. Wait for the printer's buffer to empty, take the pages
  303. in the order they fill up your tray (reversed) and place them back in the
  304. paper bin, face up (for DeskJets, I'm not sure for other printers), and hit
  305. 'Continue'. When the program finishes, the pages will be up the right way,
  306. and in the correct order.
  307.  
  308.  
  309. ARGUMENTS
  310. ---------
  311.  
  312. As described at the start of this document, plus
  313.  
  314. Layout Commands:
  315. You can precede file names with flags to control layout. These are
  316. specified as a plus (on) or minus (off) followed by the one of the
  317. following characters preceding file names they are to operate on, and
  318. stay in effect till specified again:
  319.  
  320.    C : new files begin on a new column
  321.    P : new files begin on a new page
  322.    S : new files begin on a new sheet (the default)
  323.    L : new files begin on a new line
  324.    N : restart page numbering after each file
  325.  * J : following files start in Right Justify mode
  326.  * C : following files start in Centred mode
  327.  * R : following files will start in paragraph reformatting mode
  328.  
  329.  Codes marked as * are effected by the plus/minus. A minus to J or C
  330. results in no justification, a minus to R turns off paragraph reformating.
  331.  
  332. eg. MultiPrint +J +R DocumentFile -J -R SourceCode.c
  333.  
  334. Script files:
  335. You can print a list of files by passing a file starting with a first
  336. line consisting of ";SCRIPT" (no quotes). Subsequent lines are controls
  337. as above, and file names. If a file name starts or ends with spaces, it
  338. should be quoted.
  339.  
  340. You can specify wildcards, but remember - MultiPrint does no analysis of
  341. whether a file is plain text or not. Printing binary code can eat your
  342. paper!
  343.  
  344. If FF is specified, FF characters start a new column.
  345.  
  346. The maximum number of columns is eight. Four is usually more than adequate.
  347. If you have a need for more, let me know
  348.  
  349. Font sizes should be specified in points, which are 1/72nds of an inch.
  350. This will result in the same size font on paper, no matter what resolution
  351. your printer handles/is set at. See note on resolution.
  352.  
  353. However, if you don't have any scalable fonts, you may have to specify the
  354. sizes of fonts directly. In this case use the "PxlFontSize" switch.
  355.  
  356. The "Height" argument is used to increase/decrease inter-line spacing. Use
  357. a point size greater than the font size for a larger spacing, smaller for
  358. less (at the risk of chopping the bottom off the characters).
  359.  
  360. "OddFooter"/"EvenFooter" override the default of using the filename in the
  361. footers.
  362.  
  363. LAYOUT WITHIN A DOCUMENT
  364. ------------------------
  365.  
  366. MultiPrint is designed in such a way that you shouldn't need to modify
  367. a document before printing it.
  368.  
  369. Sometimes, however, you might want to.
  370.  
  371. For example, there may be parts of a document where you don't want
  372. paragraph reformatting to occur. Or you might want to centre just a
  373. heading. Or you might want to use bold or italics for added emphasis.
  374.  
  375. MultiPrint recognises ANSI sequences for bold/italics such as are
  376. recoginised by Amiga printer drivers, and by the console device, and
  377. are sometimes used in documents.
  378.  
  379. MultiPrint also recognises some sequences of its own.
  380.  
  381. These sequences begin with {\ and end with either } or the end of line.
  382. They are of the format:
  383.   {\Xy a}
  384.  where 'X' is the first letter of the command, 'y' is the rest of the
  385. command, and doesn't need to be present, the space is required if 'a'
  386. is present, and 'a' is the argument.
  387.  
  388. They currently include:
  389. {\Bold [+|-]}
  390. Turns bold on/off. Default is on. DOES NOT TOGGLE.
  391.  
  392. {\Italic [+|-]}
  393. As with bold.
  394.  
  395. {\Underline [+|-]}
  396. As with bold.
  397.  
  398. {\Normal }
  399. Turns off all styles.
  400.  
  401. {\Justify [+|-|=]}
  402. Turns on/off. '=' means reset to this document's initial state.
  403.  
  404. {\Reformat [+|-|=]}
  405. As with Justify, but for paragraph reformatting.
  406.  
  407. {\Font [fontname]}
  408. Change font. Will attempt to change to the new font. The font will be
  409. in the current style, so if you want it un-styled, use {\N} first.
  410.  
  411. If 'fontname' is not specified, returns to the default font as specified
  412. on the command line.
  413.  
  414. {\Section <Column|Page|Sheet>}
  415. Cause a break in the document. One of C,P or S must be specified and
  416. causes printing to continue on a new column, page (side of a sheet)
  417. or sheet.
  418.  
  419. NOTE: - for Justify and Reformat only.
  420. Justify and Reformat only take effect at the start of a line.
  421.  
  422. If they are specified elsewhere, they are IGNORED.
  423.  
  424. If they are followed by the end of a line (no spaces), that line is
  425. ignored, no blank line is output. This can be assured by leaving out
  426. the closing '}'.
  427.  
  428.  
  429. SPEED
  430. -----
  431.  
  432. MultiPrint is not the fastest way of printing. It does, after all, print
  433. everything as graphics. This however is the most flexible way, and allows
  434. for the maximum amount on a page (if you can read small, high density
  435. text). Let it run in the background, however, and you only need to do
  436. anything when all the even pages are finished (when doing both-sides
  437. printing).
  438.  
  439. I admit, some printers are so slow at graphics (for example old DeskJets)
  440. that you may feel this method is pointless. Still, it gives you the
  441. option.
  442.  
  443. For higher speed use a lower density, but don't use too small a font.
  444.  
  445. NOTES
  446. -----
  447.  
  448. Resolution
  449. ----------
  450. The lower the resolution you use for printing, the less readable a font
  451. at the same point size will be. A point size of 7 at 300dpi uses a system
  452. font size of 29 pixels high, at 150 dpi the same font is only 14 pixels
  453. high.
  454.  
  455. Font Quality
  456. ------------
  457. This ties in directly with resolution. Fonts are designed for different
  458. purposes, and because of this can be of different qualities.
  459.  
  460. For instance, many fonts on the Amiga are designed as screen fonts.
  461. As such they are limited often to small point sizes, and even the larger
  462. ones may not look good when printed.
  463.  
  464. MultiPrint is designed primarily with high resolution printers, and
  465. scalable fonts in mind. Most scalable fonts are designed to be used at
  466. high resolutions, and have a lot of detail in them. They look very good
  467. printed at 300dpi with point sizes as low as 7pt. This makes them 29 dots
  468. high. If you have tried using these scalable fonts as screen fonts,
  469. however, you will know that below a certain size, they no longer look so
  470. good. Fonts that are to be used with low dot sizes, must be designed for
  471. them.
  472.  
  473. The bottom line is this:
  474. If you intend to print at resolutions lower than 300dpi, either keep
  475. to a reasonable point size (at least 10 to 12) or find a font that
  476. looks okay at whatever size you require.
  477.  
  478. You might have to rely on system (non scalable fonts) using the 'Pxls'
  479. argument.
  480.  
  481. Scalable Fonts
  482. --------------
  483. MultiPrint tries to be smart with Scalable fonts. If you specify
  484. italics, or bold, or both together, it will attempt to load the correct
  485. font for that style, rather than letting the system generate one. This
  486. results in far superior italics and bold etc at the expense of whatever
  487. time is required to open these fonts. MultiPrint will of course fall
  488. back to system generated versions if necessary. However, do try to
  489. specify the base name for a family of a fonts if possible. For example,
  490. use CSTimes where you also have CSTimesBold, CSTimesItalic, and
  491. CSTimesBoldItalic.
  492.  
  493. Fonts in general
  494. ----------------
  495. Should always be on your FONTS: assign path, and don't need to be
  496. specified with the '.font' extension. If you specify a scalable font
  497. by its full path, bold/italic versions will not be found. Instead use
  498. 'assign Fonts: "path" add' to add the path to your fonts assign.
  499.  
  500. MultiPrint keeps all fonts used in memory until it finishes, so you may
  501. run out of Chip memory for fonts if you use too many. If MultiPrint
  502. cannot open a font for any reason, it will continue using the previous
  503. font.
  504. NOTE: when I say Font, I also mean style of Font (bold, italic etc).
  505.  
  506. Paragraph Reformatting:
  507. Paragraph Reformatting is very useful for fitting text files into narrow
  508. columns, where they would either frequently wrap, or seldom come close to
  509. filling the line.
  510.  
  511. In conjunction with right justification, or flushing, you get a very nice,
  512. newspaper style output.
  513.  
  514. The problem with paragraphs is determining where they end.
  515.  
  516. In MultiPrint, paragraphs are broken up in two ways:
  517. 1. A line which begins with a space begins a new paragraph.
  518. 2. A blank line marks the end of a paragraph.
  519.  
  520. The only common method this misses out, is paragraphs which start at the
  521. beginning of a line, with no empty line before them.
  522.  
  523. With such paragraphs, you can only tell if there is a break by the fluke
  524. of how much blank space there is at the end of the last line.
  525.  
  526. Documents with paragraph breaks of this kind will need to have their
  527. paragraph breaks manually modified before printing.
  528.  
  529. Page Usage
  530. ----------
  531. Printers seldom print to the whole page. In particular, DeskJet 500
  532. printers cannot print to the top 5 millimetres of a page, the last
  533. two centimetres, the left 3 millimetres, or the right 10 millimetres.
  534.  
  535. In order to get the columns of either side of a sheet of paper to
  536. line up, you need to specify the left and right edges of printing as
  537. the LE and RE parameters. Use the environment variable MultiPrint.opts
  538. to specify these once you have found them.
  539.  
  540. The best way to find these is to print a test page with Gutter=0, LE=0
  541. and RE=0, with +R and +J before the file name.
  542.  
  543. Environment Variable
  544. --------------------
  545. MultiPrint uses an environment variable - MultiPrint.opts - to control
  546. often used options, or user defaults.
  547.  
  548. This environment variable has exactly the same format as the command line,
  549. so make sure you try anything you intend to put in it on the command line
  550. first. Also, avoid putting anything that will be interpretted as a file
  551. name in the environment variable.
  552.  
  553. Switches which are specified in the environment variable, such as
  554. 'Line' or 'Sides' cannot be turned off in the command line. Do not use
  555. them in your environment variable unless you intend to always use
  556. them.
  557.  
  558. Last Page
  559. ---------
  560. When printing to both sides of a sheet, the last even page is printed,
  561. even if it is empty. This is so the sheet is ready for the odd page.
  562.  
  563. Printing empty lines can be slow, depending on your printer and printer
  564. driver. The printer may appear to be doing nothing for a while after
  565. printing a small amount on the last even page, and the last odd page,
  566. which is printed immediately after.
  567.  
  568. Both Sides Printing
  569. -------------------
  570. After all the even pages are printed, you will be prompted to re-insert
  571. the pages, once the printer has finished printing (emptied its internal
  572. buffers).
  573.  
  574. On a deskjet printer, the pages should be inserted as they came out of
  575. the printer, face up, top of page closest to the print mechanism.
  576.