Microsoft KB Archive/23111

Byte:18 in Printer Driver PCSD

PSS ID Number: Q23111 Article last modified on 11-02-1994

1.x 2.x 3.x

MS-DOS

Question:

What exactly does byte:18 in the PCSDs of the PRD do?

Response:

Byte:18 is the “set line spacing” sequence. Word issues this sequence to the printer whenever a simple CR LF (carriage return, line feed) would not result in the correct line spacing specified under “Format Paragraph Line Spacing:”. For example, when printing to an Epson FX, a CR LF would start the next line 1/6&quot; down, resulting in six lines to the inch (which is fairly standard).

Suppose under “Format Paragraph Line Spacing:”, Word sees that line spacing has been set to .125&quot; = 9 pt. = 8 lines/inch. Word knows that issuing a CR LF (which is what it would do if “Format Paragraph line spacing:” was set to 1 li = 12 pt.) would not result in 8 lines/inch line spacing. So Word then refers to byte:18 of the EPSONFX.PRD and sees that the necessary control sequence to alter line spacing is ESC “J”, that the mod is 1 (so the parameter, rather than being in units of dyamin, should be converted to units of dyamin*3), and that the maximum value that the parameter can be is 85.

Word figures out the parameter: dyaMin is 20, so the parameter should be expressed in units of 20/1440“. Nine times 20/1440 equals 1/8, so 9 is the desired parameter, but since the mod is 1, it is multiplied by 3 to give 27. At the end of printing each line that has been formatted for 1/8” line spacing, Word sends out decimal 27 (ESC), decimal 74 (“J”), and decimal 27 (the parameter that will mean 1/8&quot; to the printer). The Epson FX interprets this and moves the printhead down 1/8&quot;.

KBCategory: kbother KBSubcategory: Additional reference words:

=
================================================================ Copyright Microsoft Corporation 1994.