{\Centre} {\Bold +} MultiPrint V1.6 - Manual John Matthews 5 April 1993 {\Centre -}{\B -} NAME ---- MultiPrint SYNOPSIS -------- {\Reformat -} {\Justify -} MultiPrint Files/A/M : Text file(s), to print and scripts of files to print. Can also include layout commands. See Later. TabSize/N/K : Number of positions to expand tabs to, default is 8. This is only used when there is no justification, and paragraph reformatting is off. FF/S : Pay attention to FormFeed characters. Starts new pages on a new column. Sides/S : Print to both sides of a sheet. Only useful with cut-sheet feeder type printers, laser jets, HP Deskjets etc. See note on 'Last Page'. Font/K : Name of font to use for text, defaults to LetterGothic.font See notes later on font usage. Size/K/N : Point size of font, or pixel size if PxlFontSize specified. Defaults to 8 points (1/72ndsof an inch, ie 9 lines per inch) or 8 pixels (real small, smaller at higher printer resolutions) if you use Pxls. LineSpace/K/N : Point/Pixel size of each line to print. ie Use twice the font size for double spacing. Columns/K/N : Number of columns to print, 1..8. Defaults to 2. Gutter/K/N : How many 1/10ths of an inch to leave at the left of odd, and the right of even pages. Defaults to 5, ie half an inch OddFooter/K : Footer for odd pages, defaults to file name EvenFooter/K : Footer for even pages, defaults to file name FooterFont/K : Name of font for footers, defaults to same as Font FooterSize/K : Point size of footer font, or pixel size if PxlFontSize specified. Specifying 0 causes MultiPrint to not print a footer, which includes page numbering. Defaults to 14 points (1/72ndsof an inch) or 14 pixels (real small) if you use Pxls Check/S : Causes MultiPrint to do a 'dry run'. No printing occurs, but lines that are too long for the point size / number of columns combination are reported. NOTE: Only use this if you are trying to print a document with no paragraph reformating and/or justification. Pxls/S : Causes MultiPrint to treat font sizes as absolute pixel height, instead of point sizes. This method is dependant on the resolution of the printer, but is necessary for use with non-scalable fonts. If you specify this flag, you should not use the default font sizes. Priority/K/N : Specifies the priority to run the spooler task at Ask/S : Prompt for confirmation of each file to print Quiet/S : No error messages for unfound files. Margin/K/N : Space in 10ths of an inch to leave between columns. Defaults to 1 tenth of an inch. Line/S : Causes MultiPrint to draw a line between columns Start/K/N, End/K/N : Specifies which page to start/end printing on. Remember that many parameters effect page layout, such a font, font size, resolution, number of columns, footers etc Density/K/N : Specifies the preferences density to use when printing, range 1..7. If you specify 0, you will be prompted with the dots per inch of each density. Not specifying density causes MultiPrint to use the current preferences density. See note on resolution later. NoCommands/S : Tells MultiPrint not to interpret '{' followed by '\' as commands. For those (infrequent) occassions when you have such a sequence in your document. There is currently no way in which you can print such a sequence, _and_ use controls in the document. NoISP/S : Tells MultiPrint not to treat an indented line as the start of a paragraph. Useful for files with indented paragraphs, ie where the whole paragraph is indented. With this switch on, only a blank line or the \P switch (see commands) will start a new paragraph. See Also the notes on Page/Printer Setup Environment Arguments {\Reformat =} {\Justify =} DESCRIPTION ----------- MultiPrint is a program for printing text files to both sides of a page, in multiple columns, and very small, or very large, high quality fonts. As an example of the efficiency of MultiPrint, I have printed a file which was designed to be 127 pages long. I printed it at 7 points, which is small, but is readable at 300dpi, and it took only 8 sheets of paper. Having been reformatted with the +R switch, 346 lines of the original document were printed on the first side of a sheet alone. MultiPrint makes use of many Amiga OS Release 2.04 features, and so requires at least this revision of the operating system. These features include Compugraphic Scalable Font technology, to produce characters to the correct size at the full resolution of the, printer, and the correct aspect ratios. SOURCE ------ The source code is not included, but is available from the author. MultiPrint was writtern in M2Sprint Modula2, but should be easy to port to other languages if desired. COPYRIGHT --------- MultiPrint V1.6 is freely distributable. MultiPrint V1.6 is free to be spread on public-domain and shareware disks especially on Fred Fish's AmigaLibDisks, as long as they are sold for a reasonable charge that is less than US $6 or equivalents. For use in commercial products the permission of the author is required. MultiPrint V1.6 may be copied and distributed via electronic networks such as the Internet, also it may be held available on anonymous ftp-servers, mail-boxes or BBS's. The Copyright is still held by the Author. I am offering MultiPrint as shareware. If you use it regularly, let me know. If you want to show your appreciation, or maybe encourage me to develop the GUI version, or specific mods, the suggested registration fee is US$20 (in notes, or something easy like that, NZ$ even better), but this is just a suggestion. Registered owners with Usenet access will get some support via email. No obligations, no promises. However, if you want to use it for some commercial project/product, please make it up to me somehow. If you need some modifications done, offer me some incentive. NO MATTER WHAT - Leave the program as is, and documentation intact. AUTHOR & SUPPORT ---------------- {\Centre +} John Matthews 4 Wadham Grove, Tawa, 6203 Wellington, New Zealand. INTERNET: tribble@gphs.vuw.ac.nz (Irregular monitoring) {\Justify =} Support may be limited to an attempt to fix any bugs which may be found, no promises. The author takes no liability for any damage caused by the program, but then, neither does he expect any. Try the program out a few times before leaving it to print a large document unattended. Leave me a message if you have any suggestions CHANGES ------- 1.0 First Release, sort of. Was never really released (29-Jan-93) 1.1 Second (attempt at a) Release. Added support for multiple files and scripts. (4-Feb-93) 1.2 Third ( attempt at a ) Release. Added : 1. Right Justification. 2. Paragraph reformating. 3. Margins and Lines between columns. 4. Start/End page printing (for aborted print jobs) 5. Density setting. 1.3 Fourth ( (and successful) attempt at a ) Release. February 24 1993 Added 1. Environment variable 2. LE and RE, to align columns on both sides of page. 3. Break commands 1.4 March 9 1993 Bug Fix : fixed bugs in 1. handling of script files (it wouldn't) 2. printing of more than one file at a time (end of last line) 3. crashing on abort 4. centering of lines Added Inter-file title option (See Arguments below) 1.5 March 20 1993 Bugs fixed : 1. printing of multiple files, other than starting a new sheet per document. 2. fixed error with lines containing only spaces Added 1. direct support for HP printers. See documentation. 2. NoCommands option (for Rob Poole) Changed 1. Moved printer specific options into MultiPrint.printer environment variable 2. Lengthened some command line option names 1.6 April 5, 1993 Bugs fixed : 1. Re-occurring centering bug (Rob Poole). 2. Error with .otag files specifying non-present fonts. Caused MultiPrint to not change styles (Italics etc) if your CGTimes .otag file specified CGTimesItalic and you didn't have it. 3. Possibly other formatting problems. 4. (Hopefully) fixed problem with Network printers found by Dale Larson. Waiting to hear on this one. 5. Now starts new files on a new sheet when it's supposed to, (the default) instead of always just on a new line. (Rob Poole again! Watch it you guys or I might start putting bugs in intentionally to give other guys a chance!) 6. Enforcer hit on last page (it came and went). Added 1. NoISP switch on command line. 2. \Paragraph command, to go with 1. Tested with Enforcer, Mungwall etc. I didn't find any hits. Let's hope Dale doesn't either. 2.0 (Planned) Workbench interface. Drop and go operation and more. PURPOSE & THEORY ---------------- MultiPrint was designed to print text files to as few pages as possible. You know how sometimes having a .doc file is not good enough, you need to be able to see it on paper, because you are always referring to it. Or you have a really neat StarTrekŠ parody you want to show someone. MultiPrint can print using multiple columns, both sides of a page, with really small, but still high resolution fonts to fit many times the usual amount on a page. For example, an A4 page can usually hold about 60 lines of text. With MultiPrint and an 7 point font (about 30 pixels high on a 300dpi laser or deskjet) giving 100 lines of text, with 2 columns of output to both sides of the page gives 100 * 2 * 2 = 400 lines per page. MultiPrint uses whichever font you specify, and can handle narrow and proportional fonts to increase the number of columns you can print. Lines can be wrapped around and right justified for improved use of space and readability, producing newspaper like output. MultiPrint allows a gutter for stapling sheets together. The default of 5/10ths of an inch is quite adequate. MultiPrint determines page size, and resolution from the system. Page oriented printers such as laser printers and Hewlett Packard DeskJets specify their resolutions directly. Tractor feed etc printers must have their lines/inch and number-of-lines set correctly to reflect page length, but they don't work so well for both sides printing anyway. MultiPrint queues the pages, and uses a child process to print the even pages first in ascending order, then the odd pages in descending order on the reverse sides. Due to the queueing of pages, MultiPrint can use a certain amount of memory. All pages are stored in memory as they are processed, also the program requires a buffer for processing the pages. Text files don't usually get large enough for this to be a problem on most systems these days, and this is faster and easier than spooling off to disk again. VERSION ------- This is version 1.6 of MultiPrint. It does everything I need, but I would like to give it a nice Workbench interface. This may, however, take time. If anyone has any need for features other than those present, let me know, and maybe offer suitable inducements :-) I'd like, at least, to make enough money to offset the cost of the ink cartridge I've almost used all of in testing this program. STARTING -------- MultiPrint is a Shell/CLI only program, and requires at least version 2.04 of the Amiga OS. All parameters, as described above, except for the file name, have defaults and require keyword specifications to override them. MultiPrint runs at a default priority of -1, as a good printing utility should, though this can be changed with the priority keyword. Priority is not overly important in some respects, however, as MultiPrint does not busy-wait. If your computer is fast enough, and/or so is your printer driver, you could well be waiting on your printer. Laser printers however will more likely be waiting on the computer, and so MultiPrint will be grabbing every available cycle, so leave at a low priority for background printing. Before printing a file, it may be a good idea to use the "Check" option to determine how much line wrapping is occuring. Modern fonts are variously weighted. A good, light proportional font can fit many more characters on average than a heavy non-proportional font, so check if the current number of columns and font size will avoid line wrapping. Too much line-wrapping and you may end up wasting space with mostly blank lines. MultiPrint can be stopped at any time with a -C, or the break command. It runs unattended until the midway point, if you have specified the "Sides" option. In this case, when it finishes printing the even pages, a prompt will appear. Wait for the printer's buffer to empty, take the pages in the order they fill up your tray (reversed) and place them back in the paper bin, face up (for DeskJets, I'm not sure for other printers), and hit 'Continue'. When the program finishes, the pages will be up the right way, and in the correct order. ARGUMENTS --------- As described at the start of this document, plus Layout Commands: You can precede file names with flags to control layout. These are specified as a plus (on) or minus (off) followed by the one of the following characters preceding file names they are to operate on, and stay in effect till specified again: C : new files begin on a new column P : new files begin on a new page S : new files begin on a new sheet (the default) L : new files begin on a new line N : restart page numbering after each file * J : following files start in Right Justify mode * R : following files will start in paragraph reformatting mode * T : following files will be preceded by their name in the form -------------------------------text.doc---------------------------------- Codes marked as * are effected by the plus/minus. A minus to J or C results in no justification, a minus to R turns off paragraph reformating. eg. MultiPrint +J +R DocumentFile -J -R SourceCode.c Script files: You can print a list of files by passing a file starting with a first line consisting of ";SCRIPT" (no quotes). Subsequent lines are controls as above, and file names. If a file name starts or ends with spaces, it should be quoted. You can specify wildcards, but remember - MultiPrint does no analysis of whether a file is plain text or not. Printing binary code can eat your paper! If FF is specified, FF characters start a new column. The maximum number of columns is eight. Four is usually more than adequate. If you have a need for more, let me know Font sizes should be specified in points, which are 1/72nds of an inch. This will result in the same size font on paper, no matter what resolution your printer handles/is set at. See note on resolution. However, if you don't have any scalable fonts, you may have to specify the sizes of fonts directly. In this case use the "PxlFontSize" switch. The "Height" argument is used to increase/decrease inter-line spacing. Use a point size greater than the font size for a larger spacing, smaller for less (at the risk of chopping the bottom off the characters). "OddFooter"/"EvenFooter" override the default of using the filename in the footers. LAYOUT WITHIN A DOCUMENT ------------------------ MultiPrint is designed in such a way that you shouldn't need to modify a document before printing it. Sometimes, however, you might want to. For example, there may be parts of a document where you don't want paragraph reformatting to occur. Or you might want to centre just a heading. Or you might want to use bold or italics for added emphasis. MultiPrint recognises ANSI sequences for bold/italics such as are recoginised by Amiga printer drivers, and by the console device, and are sometimes used in documents. MultiPrint also recognises some sequences of its own. These sequences begin with a '{' followed by a '\' and end with either '}' or the end of line. They are of the format: \Xy a where 'X' is the first letter of the command, 'y' is the rest of the command, and doesn't need to be present, {\B +}the space is required{\B -} if 'a' is present, and 'a' is the argument. {\BOLD +}All these commands should be surrounded by '{' and '}', but if I did that here, they would not appear if you printed this document with MultiPrint. {\BOLD -} -- Thanks to Rob Poole Please remember, you don't have to use any of these in your document to get good output. Just precede the document name on the command line with '+J +R'. They currently include: \Bold [+|-] {\B +}Turns bold on/off. Default is on. DOES NOT TOGGLE.{\B -} \Italic [+|-] {\I +}As with bold.{\I -} \Underline [+|-] {\U +}As with bold.{\U -} \Normal {\N }Turns off all styles. \Justify [+|-|=] Turns on/off. '=' means reset to this document's initial state. \Centre [+|-] Turns line centering on/off. Turning centering off is the same as switching to non-justified. If you want to return to justified use \Justify + instead. If you want to return to the previous justification use \Justify =. \Reformat [+|-|=]  As with Justify, but for paragraph reformatting. Turn it on/off/back to the original setting for this document. \Font [fontname] Change font. Will attempt to change to the new font. The font will be in the current style, so if you want it un-styled, use \N first. If 'fontname' is not specified, returns to the default font as specified on the command line. \Section Cause a break in the document. One of C,P or S must be specified and causes printing to continue on a new column, page (side of a sheet) or sheet. \Paragraph Force paragraph break. Only really necessary if you want paragraphs which start at the left margin, with no empty lines between them. NOTE: - for Justify and Reformat only. Justify and Reformat only take effect at the start of a line. If they are specified elsewhere, they are IGNORED. If they are followed by the end of a line (no spaces), that line is ignored, no blank line is output. This can be assured by leaving out the closing '}'. SPEED ----- MultiPrint is not the fastest way of printing. It does, after all, print everything as graphics. This however is the most flexible way, and allows for the maximum amount on a page (if you can read small, high density text). Let it run in the background, however, and you only need to do anything when all the even pages are finished (when doing both-sides printing). I admit, some printers are so slow at graphics (for example old DeskJets) that you may feel this method is pointless. Still, it gives you the option. Still, in some cases you are able to fit so many pages onto the one sheet, it is actually faster than printing that many sheets. For higher speed use a lower density, but don't use too small a font. NOTES ----- Resolution ---------- The lower the resolution you use for printing, the less readable a font at the same point size will be. A point size of 7 at 300dpi uses a system font size of 29 pixels high, at 150 dpi the same font is only 14 pixels high. Font Quality ------------ This ties in directly with resolution. Fonts are designed for different purposes, and because of this can be of different qualities. For instance, many fonts on the Amiga are designed as screen fonts. As such they are limited often to small point sizes, and even the larger ones may not look good when printed. MultiPrint is designed primarily with high resolution printers, and scalable fonts in mind. Most scalable fonts are designed to be used at high resolutions, and have a lot of detail in them. They look very good printed at 300dpi with point sizes as low as 7pt. This makes them 29 dots high. If you have tried using these scalable fonts as screen fonts, however, you will know that below a certain size, they no longer look so good. Fonts that are to be used with low dot sizes, must be designed for them. The bottom line is this: If you intend to print at resolutions lower than 300dpi, either keep to a reasonable point size (at least 10 to 12) or find a font that looks okay at whatever size you require. You might have to rely on system (non scalable fonts) using the 'Pxls' argument. Scalable Fonts -------------- MultiPrint tries to be smart with Scalable fonts. If you specify italics, or bold, or both together, it will attempt to load the correct font for that style, rather than letting the system generate one. This results in far superior italics and bold etc at the expense of whatever time is required to open these fonts. MultiPrint will of course fall back to system generated versions if necessary. However, do try to specify the base name for a family of a fonts if possible. For example, use CSTimes where you also have CSTimesBold, CSTimesItalic, and CSTimesBoldItalic. Fonts in general ---------------- Should always be on your FONTS: assign path, and don't need to be specified with the '.font' extension. If you specify a scalable font by its full path, bold/italic versions will not be found. Instead use 'assign Fonts: "path" add' to add the path to your fonts assign. MultiPrint keeps all fonts used in memory until it finishes, so you may run out of Chip memory for fonts if you use too many. If MultiPrint cannot open a font for any reason, it will continue using the previous font. NOTE: when I say Font, I also mean style of Font (bold, italic etc). Paragraph Reformatting ---------------------- Paragraph Reformatting is very useful for fitting text files into narrow columns, where they would either frequently wrap, or seldom come close to filling the line. In conjunction with right justification, or flushing, you get a very nice, newspaper style output. The problem with paragraphs is determining where they end. In MultiPrint, paragraphs are broken up in two ways: 1. A line which begins with a space begins a new paragraph. 2. A blank line marks the end of a paragraph. The only common method this misses out, is paragraphs which start at the beginning of a line, with no empty line before them. With such paragraphs, you can only tell if there is a break by the fluke of how much blank space there is at the end of the last line. Documents with paragraph breaks of this kind will need to have their paragraph breaks manually modified before printing. {\BOLD +}Please be aware that this document has had special attention to work properly with paragraph reformatting on. Many files produced as documentation for a program have headings, and formatting in them that MultiPrint's reformatting will destroy. With such files, where the formatting is important, use Justification if you like, but leave reformatting off. Or, you can modify the document to manually control the use of paragraph reformatting throughout.{\BOLD -} Page/Printer Setup ------------------ MultiPrint gets most of the information it needs from Preferences, and so you should make certain your preferences are set correctly, including printer driver, page size and density, even if you use the HPPrinter option (see below). However some information is not available in this manner. In particular: Printers seldom print to the whole page. In particular, DeskJet 500 printers cannot print to the top 5 millimetres of a page, the last two centimetres, the left 3 millimetres, or the right 10 millimetres. In order to get the columns of either side of a sheet of paper to line up, you need to specify the left and right edges of printing as the LeftEdge and RightEdge parameters in the environment variable "MultiPrint.printer". See also the section on HP printers below. The best way to find the correct LeftEdge and RightEdge values is to print a test page with Gutter=0 as an option, and LeftEdge and RightEdge unset, or set to 0 in MultiPrint.printer, and with +R and +J before the file name, and End=1 to limit the printing to one page. Then measure (in millimeters) the left and right edges of the printing. Hewlett Packard Printers ------------------------ Starting with version 1.5, MultiPrint can print directly to Hewlett Packard printers. This is not so always faster, that depends on the speed of your computer and printer - on my system, using the printer device to do the printing keeps up with the printer - but will always use less processor overhead. It also allows for printing to more of the page than the printer device can. As with the Left and Right edges as explained above, printers have top and bottom margins. These vary with printer models also, and are not provided for by preferences, which takes the lowest-common-multiple approach. Setting the HPPrinter flag in the MultiPrint.printer environment variable tells MultiPrint to print directly to an HP printer. Use the HPNoCompression flag if your printer does not support compression, such as early DeskJet models. The PageLength setting in the MultiPrint.printer variable tells MultiPrint just how long a _printable_ page your printer supports, for a given page size. To set this variable, follow this procedure: 1. Set the correct page size in Preferences for the paper you use. 2. Set the MultiPrint.printer environment variable, with the LeftEdge and RightEdge values as determined above, and with HPPrinter set. 3. Set PageSize=500 (or higher) in the MultiPrint.printer environment variable. 4. Print a page as described above, ie with +J +R and End=1 5. Take the measurement, top of the text to last line printed, in millimeters. 6. Use this value for PageSize in the MultiPrint.printer environment variable in future. For example, the correct settings for a DeskJet 500 printer with A4 paper are : SetEnv MultiPrint.printer "LeftEdge=3 RightEdge=10 PageLength=283 HPPrinter" and then, for permanent effect, copy env:MultiPrint#? envarc: Via the printer.device, you get about 5 millimeters, or 1/2 an inch margin at the top, and 21 millimeters, or just under 7 8ths of an inch at the bottom. Using HPPrinter and PageSize=283, you get 2 and 9 millimeters, respectively. Environment Variables --------------------- MultiPrint uses two environment variables, MultiPrint.opts and MultiPrint.printer, to control often used options, and optimise your printer usage. Neither of these variables can be termed necessary, but they improve either usage, quality of output, or speed. If you don't use them, you're stuck with my defaults, or with specifying all arguments always. If you don't set them, the columns on either side won't allign, and you won't get optimal speed or page usage on HP printers. MultiPrint.opts: This environment variable has exactly the same format as the command line, so make sure you try anything you intend to put in it on the command line first. Also, avoid putting anything that will be interpretted as a file name in the environment variable. Switches which are specified in the environment variable, such as 'Line' or 'Sides' cannot be turned off in the command line. Do not use them in your environment variable unless you intend to always use them. An example environment variable would be setenv MultiPrint.opts "+R +J font=CSTimes line LE=3 RE=10" This sets MultiPrint to default to Reformating, Justification, using CSTimes as the text body font, drawing a line between columns, and expecting the offsets Desjet 500s print to. You should uses "Setenv EnvArc:MultiPrint.opts" to set a permanent default. MultiPrint.Printer: This variable sets page offsets to allow the allignment of columns on either side of a sheet, as well as options for optimal use of an Hewlett Packard printer. It works similar to command lines, and has the format : LeftEdge/K/N,RightEdge/K/N,PageLength/K/N,HPPrinter/S,HPNoCompression/S and functions as follows: LeftEdge/K/N,RightEdge/K/N : measurements made as explained in Page/Printer Setup PageLength/K/N : measurement made as explained in Hewlett Packard Printers HPPrinter/S,HPNoCompression/S : switches as explained in Hewlett Packard Printers Last Page --------- When printing to both sides of a sheet, the last even page is printed, even if it is empty. This is so the sheet is ready for the odd page. Printing empty lines can be slow, depending on your printer and printer driver. The printer may appear to be doing nothing for a while after printing a small amount on the last even page, and the last odd page, which is printed immediately after. This should not happen if you use the HPPrinter option. Both Sides Printing ------------------- After all the even pages are printed, you will be prompted to re-insert the pages, once the printer has finished printing (emptied its internal buffers). On a deskjet printer, the pages should be inserted as they came out of the printer, face up, top of page closest to the print mechanism.