Personal LaserWriter NT: How to Print IBM ECS Characters



Article Change History
----------------------
05/18/93 - CORRECTED
* To correct PostScript code found in the article


Please give me some information about the use of the IBM Extended Character Set
ECS in the Personal LaserWriter NT.

- Can you use ECS with standard Macintosh software (e.g., word processing)?

- Can you use ECS with SoftPC?

- How can we use ECS from a PC running AppleShare PC?

The ECS character set in the Personal LaserWriter NT is implemented as an
extension to Diablo emulation, as opposed to an independent PostScript font.
In fact, it is designed to behave like the IBM PC Graphics ECS print wheel for
Diablo 630 daisy wheel printers. This creates some interesting requirements
for its use with different host computer environments and also imposes some
limitations on how the special characters can be used.

Each of the three scenarios you list requires its own sequence of steps to
print documents using ECS characters. Although the setup for each is
different, the basic procedure is the same. It follows these basic steps:

1) Connect to the LaserWriter in PostScript mode.

2) Send code that enables ECS.

3) Switch to Diablo emulation.

4) Print the desired characters.

Unfortunately, Diablo emulation is not documented well in the "Personal
LaserWriter NT Owner's Guide." Although code is provided to enable ECS, no
mention is given of software mode-switching or the other options available for
the DiabloDefaults dictionary. We'll cover the required basics here, and also
provide a list of the different dictionary values and their meanings.

Setting the Personal LaserWriter NT to Diablo mode with the thumb-wheel switch
requires disabling network access. Because of this, we'll avoid hardware
switching in our examples and stick with software switching. We're assuming a
Macintosh and Personal LaserWriter NT connected to an AppleTalk network along
with an IBM PC using AppleShare PC.

Enabling ECS in the LaserWriter requires the following code. It can be entered
in a text file and then downloaded using the psdump utility.

serverdict begin 0 exitserver
statusdict begin
DiabloDefaults /ecs true put
saveDiabloDefaults

This will persist, until it is forced back by the same code using "/ecs false"
in place of "/ecs true". You needn't repeat his step, unless it has been
intentionally reversed.

Now, we switch to Diablo emulation and send the desired text to be printed.
Software switching of the Personal LaserWriter NT differs from hardware
switching (and from software switching of the LaserWriter IINTX) in that it
only persists until the end of the print job. Any Diablo text or ECS
characters must be appended to the switching code or be treated as a separate
print job:

statusdict begin currentfile /diablo emulate
This text will be printed as if the Personal LaserWriter NT
were a Diablo 630.

If the above lines were downloaded to the LaserWriter with psdump, the second
two lines would be printed verbatim. If there were special ECS characters,
those would be printed as well.

We can't show any of the actual ECS characters in this article, but we can show
you how to generate them. The ECS character set is essentially an expanded
version of the standard Diablo character set. The special characters lie in
the ASCII ranges below 31 and above 126. The following Microsoft BASIC program
creates a text file with the special characters in the high range of 127
through 255.

10 open "ECS_STUF.TXT" for output as #1
20 for i=127 to 255
30 print #1, chr$(i);
40 if (i-126)/70 = int((i-126)/70) then print #1, ""
50 next i
60 close #1

A similar HyperCard script could be used to create the file on a Macintosh.

on mouseDown
put "High ASCII ECS Chars" into filename
open file filename
repeat with i = 127 to 255
write numToChar(i) to file filename
if (i-126)/70 = (i-126) div 70 then write return to file filename
end repeat
close file filename
end mouseDown

To print these files, prefix them with the Diablo emulation PostScript code
from above and download the result with psdump. The result should be a page
with two lines of the high ASCII ECS characters.


Published Date: Feb 18, 2012