The MDFS server allows you to add printer banners to data printed from it.
This is only really suitable for text-only printouts. If anything else is to be sent (such as
a raster image to a LaserJet, then banners should not be used).
However... It is possible to have multiple printer definitions referring to the same printer,
with different banners. For example, on my server the printers defined are:
Printer #1 MDFS [Default] Spooling, to Parallel, no banner Anonymous users allowed to print Printer #2 Hold Output held Anonymous users allowed to print Printer #3 UsrPrn Spooling, to Parallel, banner Anonymous users allowed to printThe printer connected to Parallel is an EPSON GQ-5000 LaserJet. If I want to print raster images (such as something from Ovation), I send it to "MDFS". If I want to dump out some plain text (such as an !Run file or !Help file), I can send it to "MDFS" for no header or to "UsrPrn" to be given a header.
Under version 2.00 of the MDFS code, it is possible to set up banners very easily. Simply create
a directory in the root of the main (lowest numbered) disc partition, called "BANNERS".
Within this directory, create a banner file and save it with the same name as the printer that
it applies to.
For example, my system is set up as:
$ | '-- banners | '-- usrprnThere is only the one file as only the one printer has a banner. If I wanted a banner for the "MDFS" printer, I'd create it and save it as "mdfs"!
You should use something like !Edit to create your banners. If you are using a BBC micro, you can use WordWise provided you don't embed control functions in the document. Failing all of that, you can write a short BASIC program to open the file and BPUT# the required information.
The banner allows you to print information at the top of the output and append something to the bottom of it. You can include printer control codes, for example two banners relating to the same printer, one called "draft", the other called "nlq", with the banners selecting the output style as it goes.
The format of the banner file is simple:
end text<BANNER>banner text
We shall look at my banner as an example:
[0c]<BANNER>[0d]****************************************************************************[0d] <MARK>* Printer "UsrPrn" on MDFS server 2.254<TAB 76>*[0d] <MARK>* Username : <USERNAME><TAB 76>*[0d] <MARK>* Station ID : <STATION><TAB 76>*[0d] <MARK>* <START>Submitted : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 76>*[0d] <MARK>* <NOW>Printed : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 76>*[0d] ****************************************************************************[0d] [0d]This is formatted as it would be seen in !Edit.
[0c]
is ASCII character 12. This forces a form feed, so the
printer ejects the page rather than waiting for more input.<BANNER>
code, which says that the ending text is finished, the
remainder is to be put before the actual printed text.**************************************************************************** * Printer "UserPrn" on MDFS server 2.254 * * Username : SYST * * Station ID : 001.252 * * Submitted : 28th June 1999, 12:57:42 * * Printed : 28th June 1999, 12:57:42 * **************************************************************************** | !Run file for BudgieSoft VideoList <-- This is the file being | printed, not the banner! %Set VideoList$Dir <Obey$Dir> %IconSprites <VideoList$Dir>.!Sprites | [et cetera...]The following codes are available:
<HOURS> Gives a two-digit hour in the 24hr clock, with leading zero. For example, 6pm would be printed as 18. <H> Short form of HOURS. <MINUTES> Gives the minutes past the hour in the range 00 to 59, with leading zero. <M> Short form of MINUTES. <SECONDS> Gives the seconds past the minute in the range 00 to 59, with leading zero. <S> Short form of SECONDS. <12HOURS> Gives the hour in the 12hr clock, with leading zero replaced by a space. <AM> Gives 'am' or 'pm' as appropriate. Noon is considered 'pm'. <DATE> The day of the month, two digits, with leading zero replaced by a space. <ST> Gives correct suffix for day of month; for example 1st, 2nd 3rd, 4th et cetera. <MONTHNAME> Gives the full name of the month (ie, 'December'). No leading spaces are printed. <MTH> Gives three-letter abbreviation for the month, in lower case. For example, 'December' is printed as 'dec'. <MONTH> Gives month as a number in range 01 to 12, with leading zero. <YEAR> Gives the last two digits of the year. My banner file says "19<YEAR>" so will need to be changed on the millennium. <USERNAME> Gives the name of the user that submitted the print job. No leading spaces are printed. <STATION> Gives the number of the station that submitted the print job. The network and station numbers are printed with leading zeros; with the exception of stations on the network local to the server which have the network number omitted. No leading spaces are given in this case. For example, server is 2.254: From 1.252, it would output '001.252' From 2.96, it would output '096' <BANNER> The delimiter between the end text and the banner text. If you have no end text, begin the file with this code. However I suggest you put a Form Feed to be given to the end of the file. This does not cause anything to be printed directly. <B> Short form of BANNER. <MARK> A reference point for TAB (see below). This does not cause anything to be printed directly. <TAB xxx> Pads out to a position xxx spaces from the last MARK. There must be only one space between 'TAB' and the number. If no MARK has been given, this pads out xxx spaces from the beginning of the text. Note that a carriage return does not reset the value of MARK. <TAB 0> is illegal, and will be printed as '<TAB 0>'! <NOW> Sets the time variables to the moment when printing is actually taking place. Note that two NOWs (such as one in the banner and one in the end text) may store different times as time may have elapsed between them. This does not cause anything to be printed directly. <START> Sets the time variables to the moment at which the printing was initiated, from the user's computer. Note that when print spooling is used, this (and END below) may be substantially earlier than the time given by NOW. This is the default time selection. This does not cause anything to be printed directly. <END> Sets the time variables to the moment that user finished sending characters to the printer. This does not cause anything to be printed directly.You can include control codes in the file either directly (if your editor supports this), or by use of the '
|
' character.
| introduces a 'control' character, for example |L inserts a <ctrl-L>, which is a Form Feed. |? inserts ASCII character &7F (delete). |! inserts the next character with &80 added (top bit set). |< inserts '<' |> inserts '>' || inserts '|' Control code table: 0 |@ 27 |[ 1 |A 28 |\ 2 |B 29 |] 3 |C 31 |^ 4 |D 31 |_ 5 |E 6 |F ... 7 |G 8 |H 60 |< 9 |I .. 10 |J 62 |> 11 |K 12 |L ... 13 |M 14 |N 124 || 15 |O 16 |P ... 17 |Q 18 |R 127 |? 19 |S 128 |!|@ 20 |T 129 |!|A 21 |U 22 |V ... etc... 23 |W 24 |X 254 |!|~ 25 |Y 255 |!|? 26 |ZUsing the table above, my banner could be rewritten as:
Note - this is ALL on one line: |L<BANNER>|M****************************************************************************|M|J<MA RK>* Printer "UsrPrn" on MDFS server 2.254<TAB 76>*|M|J<MARK>* Username : <USERNAME><TAB 76>* |M|J<MARK>* Station ID : <STATION><TAB 76>*|M|J<MARK>* <START>Submitted : <DATE><ST> <MONTHNAM E> 19<YEAR>, <H>:<M>:<S><TAB 76>*|M|J<MARK>* <NOW>Printed : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 76>*|M|J*********************************************************************** *****|M|J|M|J