Comet98 Printer Configuration Guidelines
Here are some basic guidelines to follow when configuring
printers under Comet98. We have included configuration steps,
a discussion of the advantages and disadvantages of different
configuration modes, and an introduction to the Driver Event
Server feature available in Comet98.
Configuration Steps
- Configure and test your printer using the standard Windows
"Add Printer" function found in the "Printers" folder located
in the "Settings" menu off of your Windows "Start" menu.
This printer should be able to perform all of its advertised
functions when used from a Windows program such as a word processor,
spreadsheet, or graphics application.
- Add an entry to the "[Printers]" section of your Comet
configuration .INI file as follows:
Printer = Comet printer,W,Spool Type,Spool Name,Windows printer,DES program,;
where:
Comet printer is any valid Comet printer name (e.g., LP1, LP2, LPW)
Spool Type is N (none), E (exception), or A (auto)
Spool Name is the name of a Comet spool (e.g., SP1, SP2)
Windows printer is the name of the Windows printer set up in step 1
(as it appears in the folder). For "raw" mode of operation, the control word
":RAW" is appended to the name. See below for more information.
DES program is the name of a Driver Event Server program (if any)
that this printer will use. See below for more information.
Examples:
Printer = LP1, W, N, , Epson MX80:RAW,,; ; Raw mode
Printer = LP2, W, N, , Epson MX80,,; ; Cooked mode
Printer = LP3, W, A, SP1, HP LaserJet 4,, ; ; Cooked mode
- Load Comet (if not already running) and run the SYSGEN utility program.
Choose option 1 to generate a new Comet .CFG file. Restart Comet and test
your application. It should print as it did under the 504 DOS version of
Comet.
Note that the same physical printer may be configured under more
than one Comet printer name in order to select specific features.
Simultaneous printing to such printers will be successful if correct
Windows spool settings are selected.
"Raw" vs. "Cooked" Mode Printers
Comet 98 offers two modes of printer support for MTB applications.
Which mode you use at any given installation depends on the level
of compatibility you desire with the DOS version of Comet.
The primary difference between a "raw" mode printer and a "cooked"
mode printer is the addition of the control word ":RAW" to the
Windows printer name for a raw mode printer. A raw mode printer
is required for fully 100 percent Comet/DOS compatible printer operation.
The features for each print mode are as follows:
Raw Mode:
- Advantages:
- Provides 100% compatibility with existing MTB applications.
- The application may use printer-specific control codes to
modify the printer's behavior.
- Disadvantages:
- Requires direct knowledge of specific printer codes by MTB
applications to perform special operations (compressed print, etc.).
- The application may not use any Windows-oriented printer controls
such as font selection, line drawing etc.
Cooked Mode:
- Advantages:
- Provides an MTB application with access to the Windows
Graphical Device Interface (GDI), providing enhanced features
allowing custom forms to be printed directly under MTB program control.
- Provides limited compatibility for those legacy applications
that use standard sized printer forms. Different sized forms may be
used if the printer itself has knowledge of the form size when performing
a form-feed (note that this is usually NOT the case).
- Printer font type/size may be modified by specifying Windows fonts.
- Knowledge of the specific kind of printer or its control codes
is not required by the MTB application to use enhanced features.
- Disadvantage:
- Legacy programs that rely on line counting to print non-standard
sized forms may not function properly.
Discussion
Many applications, specifically those that use standard form length
(11 inches in the U.S.), can function properly when printing to a cooked
mode printer by choosing an appropriate Windows font that is compatible
with the printer. To eliminate MTB program modification, "System" fonts
can be set to choose a font that will initially be used for a specific
printer. System fonts are specified in the COSW.INI file (located in the
WINDOWS directory). These settings affect Comet cooked mode printers only.
Entries in the COSW.INI file must conform to the following example:
[Printer Fonts]
printer name Font-n = font, height, chars per inch, weight
where:
printer name is the name of a Windows printer. If omitted,
this entry represents the default for all printers not listed.
n is a number to represent the font. The current standard for
font usage is:
0 represents a normal size font
1 represents a compressed or narrow font
2 represents a expanded or wide font
font is the name of an existing Windows font
height is the character height specified in points
chars per inch is the desired number of chars per inch
weight is the heaviness of the font (range=0-1000, normal=400)
Examples:
; for printers not listed separately
Font-0 = Courier New, 12, 10, 400
Font-1 = Courier New, 12, 17, 400
Font-2 = Courier New, 12, 6, 400
; for HP LaserJet 4 only
HP LaserJet 4 Font-0 = Courier, 12, 10, 400
Some printers may not give the desired results with any of the
available Windows fonts. If this should be the case, there are
two options available:
- Configure the Windows printer using the supplied "Generic"
printer driver available when setting up your printer. Because
generic printers are "text only" printers, Windows will not attempt
to load any fonts to the printer, resulting in the printer using
whatever font (or other settings) set by the factory or the front panel.
- Use the raw mode described earlier in this document.
Driver Event Servers (DES)
When using a Comet printer that is configured to operate in
"cooked" mode, the printer can be enabled to generate pre-printed
pages for an existing MTB application. This feature is enabled by
specifying a Driver Event Server program in the configuration.
A Driver Event Server (DES) is nothing more than an MTB subprogram
that is "entered" transparently to the user program. Once in control,
the DES program can access the printer and perform various operations
to prepare a page for printing by the user application.
As is implied by its name, a DES is entered only in response to
certain printer events. Currently those events supported are:
Initialization (just after the printer has been opened), NewPage
(before a form feed), and Shutdown (just before the printer is closed).
The following example shows how a DES can be included in your Comet
.INI configuration file:
Printer = LPW, W, N, , HP LaserJet 4, PWMARK,;
The DES program in this example is named PWMARK.OBJ. Note that the
.OBJ extension is not specified in the configuration syntax.
Sample DES programs can be found in the Comet demonstration directory
for Windows (DMW), which is available, along with the required WDL
directory, at the Signature Systems web site. The following sample
DES programs are currently available:
- PWMARK (source #PWMARK) draws a water mark on each page
- PFORM (source #PFORM) generates a sample invoice form
- PFONT N/C/E (source #PTRFNT)
Each selects one of the system fonts as follows:
N = System font 0 (normal print)
C = System font 1 (compressed [narrow] print)
E = System font 2 (expanded [wide] print)
F e e d b a c k