Section Nine - The Printer Editor
Printing with a dot-matrix printer? This is where you should be
With PipeDream, you can create documents containing highlight codes that specify particular type styles and effects, such as bold and underlined text, superscripts and subscripts, and alternative fonts. Because different printers use different techniques to achieve these effects, the Cambridge Z88 uses a printer driver to convert the standard PipeDream highlights to each particular printer's codes. The printer driver can then be altered to suit a particular printer's facilities.
The Cambridge Z88 comes with a built-in driver, which interfaces with the widely-used Epson series of dot-matrix printers, or other printers compatible with this.
Creating a new printer driver or modifying an existing one
The Cambridge Z88 PrinterEd application allows you to create your own printer driver definition, editing the options used by the built-in driver to add your own special printing effects to your documents.
Alternatively, you can design a printer driver definition for a make of printer not catered for by the built-in driver. To do this you will need to consult the printer handbook, to find out which codes are needed for each facility you want to use.
Having created a new printer driver definition, you can use this to replace the built-in driver with the Update Driver command.
To run the editor select PrinterEd from the Index APPLICATIONS list, or press E from any application.
The driver definition is displayed on two pages. You can move between the pages with the following commands:
move from page 1 to page 2
move from page 2 to page 1.
While developing and testing a printer driver it is sensible to keep PrinterEd as a suspended activity. On completing a driver definition, and saving it to the filing system, the PrinterEd activity can be deleted from the Index with KILL.
Editing the driver definition
The printer driver definition is altered by moving the cursor to the appropriate field on the page with the cursor keys,, , and and then typing the required value for the option. The editing commands are summarised on the PrinterEd CURSOR menu.
Some options take a Yes/No value; in this case you can toggle between the values with the Next Option command, J, or select the appropriate value by typing Y or N.
Most options take a list of one or more codes, separated by commas.
Code values
Printer codes can be entered in any of the following forms:
Type | Example 1 | Example 2 |
|---|---|---|
Decimal number | 90 | 27 |
Hexadecimal number | $5A | $1B |
ASCII character | "Z" |
|
ASCII symbol |
| ESC |
The two examples show equivalent representations of the same values.
Any of the standard ASCII symbols can be used to represent the values 0 to 31, or $0 to $1F.A full list is given in Appendix D - Character Set.
Highlight codes
Page 1 of the PrinterEd application allows the behaviour of each of the eight PipeDream, highlight codes to be specified.
The recommended assignment of highlight codes to printer functions is as follows:
Code | Function | Printed example |
|---|---|---|
1 | Underline | underlined type |
2 | Bold | bold type |
3 | Extended sequence |
|
4 | Italic | italic type |
5 | Subscript | H2O |
6 | Superscript | e=mc2 |
7 | Alternative font |
|
8 | User defined |
|
In every case the same highlight turns the facility off, and in all cases except 7 and 8, the facility is also turned off at the end of a slot.
The highlight table contains three columns specifying the following information for each of the eight highlights, 1 to 8:
ON String | The sequence of codes needed to turn the facility on |
OFF String | The sequence of codes needed to turn the facility off |
Off at CR | Ye s or No , to determine whether the facility should be cancelled at the end of a slot. |
You can move between columns using the cursor keys and , and between lines with and .
ON String and OFF String
The ON String specifies the sequence of codes to turn the corresponding printer facility on, and the OFF String the sequence of codes to turn it off. Each of these sequences of codes is output on alternate occurrences of the specified highlight code in the document.
If the facility is toggled on and off by the same sequence of codes, the OFF String can be omitted, and the ON String will be output on every occurrence of the highlight.
Overprinting
On some printers special effects can be obtained by outputting a sequence of codes for every character printed. For example, some daisy-wheel printers underline by backspacing, and then printing an underscore character, for every character printed.