EEA index
MDFS
Intro |
Printer bannersThe 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). 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 printed from RISC OS), I send it to "MDFS". If I just want to dump out some plain text, I can send it to "MDFS" for no header or to "UsrPrn" to be given a header.
Where banners are storedUnder 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 "$.banners.mdfs".
Writing a bannerYou 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 mechanism 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 for the subsequent output.
Banner file formatThe format of the banner file is simple:We shall look at my banner as an example: [0c]<BANNER>[0d]********************************************************[0d] <MARK>* Printer "UsrPrn" on MDFS server 2.254<TAB 56>*[0d] <MARK>* Username : <USERNAME><TAB 56>*[0d] <MARK>* Station ID : <STATION><TAB 56>*[0d] <MARK>* <START>Submitted : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 56>*[0d] <MARK>* <NOW>Printed : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 56>*[0d] ********************************************************[0d] [0d]This is formatted as it would be seen in !Edit. The first character, [0c] is ASCII character 12. This forces a form feed, so the printer ejects the page rather than waiting for more input. Next is the <BANNER> code, which says that the ending text is finished, the remainder is to be put before the actual printed text. When printed, it looks something like: ******************************************************** * 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...]
Banner codesThe following codes are available:
Including control codesYou can include control codes in the file either directly (if your editor supports this), or by use of the '| ' character.
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 (this is ALL on one line, split here for formatting purposes only): |L<BANNER>|M******************************************************** ********************|M|J<MARK>* Printer "UsrPrn" on MDFS server 2.25 4<TAB 76>*|M|J<MARK>* Username : <USERNAME><TAB 76>*|M|J<MARK>* St ation ID : <STATION><TAB 76>*|M|J<MARK>* <START>Submitted : <DATE>< ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 76>*|M|J<MARK>* <NOW>Print ed : <DATE><ST> <MONTHNAME> 19<YEAR>, <H>:<M>:<S><TAB 76>*|M|J*** ******************************************************************** *****|M|J|M|J |