Ref: 15990024
Title: Setting Up a PostScript Printer With 3+Open for Macintosh
Date: 11/7/90

Copyright 3Com Corporation, 1991.  All rights reserved.

On a LaserWriter connected to a 3+Open server, some extended characters--such
as the bullet, copyright symbol, and paragraph symbol--may not print properly.

The problem is due to the default configuration of the LaserWriter.  At
the factory, the printer is set to seven data bits and no parity.  In general,
this works fine with 3+Open because the eighth bit will be ignored.  However,
when you send a character to the printer that has the high order bit set,
it does not print properly because the LaserWriter is ignoring the eighth
bit.

To solve the problem, change the configuration of the LaserWriter.  To set
the parity parameters, you must send a PostScript program (such as the one
at the end of this article) to the printer.

The PostScript program at the end of this article has two parts.  The first
part sets the port parameters.  The second part prints a page on the printer
to show what the parameters are set to.  In the first part of the program,
note the following key points:

  *  The first three lines of this section (statusdict begin 25 sccbatch
through serverdict begin 0 exitserver) check the current configuration of
the port and bypass setting the parameters if they match what the port is
already set to.  This is necessary because the part on the LaserWriter IINT
that holds the port configuration can only be reset a limited number of times
before it wears out.

  *  The actual value of the parameter-setting option is 71.  71 sets eight
data bits, no parity, and hardware (DSR/DTR) handshaking.  The following
table shows the valid values for this parameter:

        Parity        Handshake       7 bits    8 bits
        ------        ---------       ------    ------
        None (space)  XON/XOFF        0 or 32     64
                      DSR/DTR         4 or 36     68

        Odd           XON/XOFF          33        65
                      DTR/DSR           37        69

        Even          XON/XOFF          34        66
                      DTR/DSR           38        70

        None (mark)   XON/XOFF          35        67
                      DSR/DTR           39        71

Note:  These values are for the Apple LaserWriter family of printers.  If
your printer is 100% LaserWriter II-compatible these values should work.
Otherwise, consult your printer manual for the appropriate values.


Software Handshaking:

3Com recommends using DTR/DTR handshaking.  This requires the use of option
71.  To use another option (for example, XON/XOFF when using a three-wire
cable), you must change the 71 in both places in the code to the appropriate
value.


Hardware Handshaking:

For hardware handshaking, the following cable configuration is required.
This configuration matches that of Hewlett Packard's LaserJet-to-IBM PC cable.

         Computer        Printer
         --------        -------
             1               1
             2               3
             3               2
             7               7
          5 & 6             20
            20           5 & 6


Configuring Your Comm Port:

To configure your comm port to the correct parameters, run NETSETUP and
select the printer configuration and port parameters.  Use 9600 bps, 8 data
bits, 1 stop bit, and no parity.  Set all other options (except continuous
retry) to Yes.  This will generate the following line in the SETMODE.CMD
file:

   C:\OS2\MODE.COM COM1:
   9600,N,8,1,to=on,xon=on,idsr=on,odsr=on,dtr=on,rts=on


As the final step in configuring your printer, save the following PostScript
program as a separate text file, then send it to your printer:

%%Title: setparam.ps
%%Creator: Andrew Dater
%%ModifiedDate: 11/07/90
%%For: 3Com Corporation
%% (C) Copyright 1990 by 3Com Corporation, Apple Computer
%% All Rights Reserved.
%%CreationDate: 11/01/90
%%EndComments

%% To change the settings

statusdict begin 25 sccbatch exch pop
71 eq {stop} if
serverdict begin 0 exitserver
statusdict begin 25 9600 71 setsccbatch

%% To print out the settings

/Helvetica findfont 14 scalefont setfont
/cr{show 182 currentpoint 20 sub exch pop moveto}def
/tb{show 300 currentpoint exch pop moveto}def
/Which{5 -1 roll 4 exch sub -1 roll cr
3{pop}repeat}def
statusdict begin 25 sccbatch end 182 650 moveto
exch (Baud :)tb 10 string cvs cr
(Parity:)tb dup 30 bitshift -30 bitshift
(none-space)(odd)(even)(none-mark) Which
(Handshake:)tb dup 27 bitshift -29 bitshift
(XON/XOFF)(DSR/DTR)(ETX/ACK)(bad value) Which
(Data bits:)tb dup 25 bitshift -30 bitshift
(standard)(7)(8)(bad value) Which
(Stop bits:)tb -7 bitshift 0 eq{(1)}{(2)}ifelse
show showpage

