Copyright: "Copyright (C) 1994 Microsoft Corporation"


Unitool for Windows NT - Online Help Contents

  General Information on Minidrivers and Unitool

  Developing Windows NT Minidrivers

  Master Units and Minidriver Data

  Control Information

  Paper Information

  Graphics Information

  Font Information

  Model Data

  Printer Font Metrics (PFM)

  Character-Translation Table

  Minidriver Callback Functions

  Unitool Error Messages

  Printer Font Metric Structure


Unitool and Minidrivers, General Information

  General Information on Minidrivers and Unitool

  Introduction

  Unitool Data Structures

  Minidriver Printer Data Window

  Fonts

  String-Table Resources

  Minidriver Callbacks

  Commonly Used Minidriver Values

  Minidriver Commands

  Printer Commands

  Coordinate System

  Developing Windows NT Minidrivers

  Master Units and Minidriver Data

  Control Information

  Paper Information

  Graphics Information

  Font Information

  Model Data

  Printer Font Metrics (PFM)

  Character-Translation Table

  Minidriver Callback Functions

  Unitool Error Messages

  Printer Font Metric Structure


Introduction

The Microsoft® Windows NT™ Unitool application is a development tool that permits characterization data to be organized and defined into a minidriver for a printer or for a selected group of similar printers. The Unitool application is provided to eliminate the need to create complex drivers for similar printing devices. The characterization data Unitool creates in the minidriver provides the resources the Windows NT Universal printer driver (Unidriver) requires to run a printing device. In fact, the Unitool application has enabled hundreds of related printing devices to be supported using the minidriver in conjunction with the Unidriver printer driver.

Other reasons for using minidrivers include:

•	Achieves portability across Microsoft platforms and CPU types.

•	Provides improvements to the minidriver and printer driver software.

•	Receives updates and changes to the graphics engine.

•	Obtains high quality color rendering and halftoning.

•	Supports 1, 4, and 8 bits-per-pixel color.

Unitool applies the GPC data files that provide resource data for each source printer driver. Specifically, Unitool can provide GPC data for the Epson 9-pin driver, the Epson 24-pin driver, the Hewlett Packard driver for printers that use HPPCL, the HP PaintJet driver, and the base driver. The Unitool application, the GPC data, and the related files and information required to build a minidriver are provided in the Windows NT DDK.

The GPC resource data in Unitool enables you to collect comprehensive information about the related printer driver in the minidriver. Each minidriver supports the user interface driver and the Windows NT Unidriver. For the user interface, the minidriver data defines general information about the printer, such as the number of available paper trays, and what form is contained in whichray.

The Unidriver is a data-driven printer driver that uses the minidriver to provide essential data about a printer. For example, the Unidriver retrieves required information from the minidriver to determine the current resolution of the printer, to identify which fonts are available, and so on.

The subsequent topics:

•	Contain information related to using Unitool

•	Describe the general procedure for building a Windows NT minidriver

•	Provide a comparison of the minidrivers for Windows NT and Windows 3.1

Subsequent topics provide detailed descriptions of each type of information contained in Unitool, including:

•	Character-translation table used to remap characters from the printer's native character and symbol set to the Windows ANSI set.

•	Minidriver data and the specification for master units

•	Control information, including the page-control and cursor-movement commands.

•	Paper information, including the paper size, paper source and paper destination commands.

•	Graphics information, including the printer resolution, compression, color and rectangle fill commands

•	Font information, including text font cartridge, font simulation and downloadable fonts

•	Printer model data, including model-specific data for the concerned minidriver.

•	Minidriver callback functions.

•	Unitool error messages.

Note  The Unitool program creates data files (including PFM and CTT) that are compatible with Windows 3.1. You should convert certain files to the necessary Windows NT format. For more information, see Converting a Minidriver to Windows NT.

Many topics contain examples of minidriver data for the following printer types:

•	Kodak Diconix 150 Plus

•	Hewlett-Packard LaserJet IIP

•	Hewlett-Packard PaintJet

The Kodak Diconix printer is an ink-jet printer that uses a command set similar to the Epson and IBM dot-matrix printer command set. The HP LaserJet IIP printer is a laser printer that uses HPPCL. The HP PaintJet is an ink-jet color printer that is used as an example to describe color support for the minidriver.


Unitool Data Structures

Using Unitool, a developer who understands the hardware and command set for a printer can develop a minidriver by initializing its component data structures using the minidriver's Printer Data window. The minidriver's data structures are identified as follows:

Structure	Description
COMPRESSMODE	Contains data compression mode commands.
CURSORMOVE	Indicates the limitations of the printer cursor-movement commands and contains command strings that move the printer's cursor.
DEVCOLOR	Indicates the printer's color capabilities and contains command strings that enable color output.
DOWNLOADINFO	Contains command strings that download fonts.
FONTCART	Contains font cartridge commands and command strings that select the specified cartridge and identify the fonts on that cartridge.
FONTSIMULATION	Contains command strings that enable and disable bold, italic, underline, and strikethrough font simulations.
MODELDATA	Indicates the characteristics of a printer model (s).
PAGECONTROL	Contains command strings that initialize the printer, select the paper orientation, and so on.
PAPERDEST	Specifies the paper output bin that collects the pages and contains command strings that select the specified bin.
PAPERSIZE	Specifies the size dimensions of the printer paper and contains command strings that configure the printer for the specified paper size.
PAPERSOURCE	Contains command strings that identify the paper bin or feeding mechanism.
RECTFILL	Indicates the printer's rectangle fill capabilities and contains command strings that fill rectangular regions.
RESOLUTION	Indicates the horizontal and vertical raster graphics resolution that the printer supports and contains command strings that select the specified resolution.


Minidriver Printer Data Window

Each data structure in the minidriver's Printer Data window corresponds to one or more of the dialog boxes in the Unitool application. Setting the controls in the Unitool dialog boxes actually initializes the members of these structures. Unitool provides an organized means of entering in printer data and command strings that become part of a minidriver's Printer Data window. In turn, Unitool interprets the data that is already available and generates GPC data as requested.

The minidriver's Printer Data window contains four key types of GPC data for each category of printer:

•	Printer data resources

•	Font data resources

•	Glyph encoding data resources

•	String-table resources

The printer data resources provide most of the data contained in the minidriver data structures. Each minidriver's Printer Data window contains a host of information about the printer, such as resolution, text clipping, underlining, and strikethrough. Unitool also describes, for example, compression capabilities, available paper sizes, sources, destinations, how to move the print position on the page, font simulations such as underscore or italic, rectangular fill commands, and how to download fonts.


Fonts

Some printers have many fonts, others have none. The minidriver font data resources define which fonts are available depending on the current configuration of the printer. For example, dot matrix printers have no fonts when printing in landscape mode. Fonts can also be cached in the printer. The Laserjet printer enables fonts to be downloaded from disk, including TrueType fonts. In this case, the bitmap information is taken from the TrueType fonts and is downloaded to the printer to create a device font that can be processed quickly, thereby reducing the size of the data stream.

To render text with device fonts and retrieve font data in response to application queries, the Unidriver requires PFM and font selection commands. The character data for device fonts is stored in the printer or in a font cartridge. Printers render text faster with device fonts because the bitmap or vector data is device resident and does not require downloading from the disk to the printer.

A CTT for 16-bit drivers and RLE format for 32-bit drivers are used by the Unidriver to map characters from a printer's native character and symbol set to the Windows ANSI character set to identify the printable characters. The current version of the Windows ANSI character set contains 244 entries. The Unidriver provides support for some of the common code pages and symbol sets to eliminate redundancy in a large number of individual printer drivers and permit individual drivers to support the less common ones. The font data resources and the CTT-data resources differ from the resources used in the Windows NT minidriver.


String-Table Resources

The GPC data refers to string-table resources by indices. String resources are specified in a number of the Unitool dialog boxes. For example, strings indicate the printer models the driver supports. In the user interface, strings define how to format the resolution for printing and how to display the information for the user. Other strings define information, such as the names of the paper trays. The string indices track the actual IDs in the .rc file. The strings are stored in that file and can be translated into other languages if necessary.


Minidriver Callbacks

In addition, a minidriver callback function is required when the printer provides functionality the Unidriver does not support. For example, suppose the bit order in the printhead is in reverse to the common convention where the most significant bit is the uppermost print pin. The only function currently supported by Windows NT Unidriver is the FilterGraphics function.


Commonly Used Minidriver Values

Unitool separates the minidriver data into a set of related application functions. These functions can be selected using the cascading menu near the top or from the individual lists shown in the minidriver's Printer Data window. When a function is selected, a corresponding dialog box is displayed to permit minidriver data to be entered or updated. Each dialog box can contain two type of values: selectable values and user-defined values.

Selectable values are listed as a set of values commonly used by the minidriver, such as the predefined values for standard paper sizes, paper sources, and paper destinations. Unitool dialog boxes also request user-defined values such as a name, a printer command string, or a control value. In addition, defaults are provided for the user-defined values commonly entered for the source driver.


Minidriver Commands

Unitool can provide commands that enable or disable certain features of the printer. For the Kodak Diconix 150 Plus printer, the string ESCx3 defines the Select String command. In Unitool, ESCx3 is represented as \x1Bx\x03. The string ESC is replaced by the ASCII representation (\x1B), the argument x is not altered, and the decimal value 3 is replaced by the hexadecimal equivalent (\x03).

Commands can also contain parameters supplied by the Unidriver at runtime, when the command is used. For example, in the CURSORMOVE dialog box, the CM_OCD_YM_REL command advances the cursor in the positive y direction, relative to the current position. For the Diconix 150 plus printer, the Immediate Line Feed string, ESCJn defines the command, where n is the number of 1/288th inch increments that the cursor advances. In this case, the ESC string is replaced by its ASCII representation (\x1B), the argument J is not altered, and the variable n is replaced by the conversion character to convert the parameter to a byte value (%c).

Unitool stores each printer command in a CD data structure. In cases where the Unidriver supplies an argument to a particular command, such as the Immediate Line Feed command, Unitool stores the additional data in an Extended Command-Descriptor (EXTCD) data structure. This data structure contains values by which the Unidriver divides, multiplies, increases, or limits command arguments.


Printer Commands

Printer commands and control values can be entered in any combination of the following formats:

Format	Description
ASCII	Enter literal ASCII characters
Hexadecimal	Hexadecimal values are preceded by the backslash character: \x. For example, the hexadecimal value 0xFF is typed as \xFF.
Converted parameters	Convert the minidriver parameters to a special format and send these parameters to the printer using a conversion character. Each conversion character is preceded by the % (percent) sign. The current conversion characters are as follows:
Character	Description
%d	Decimal value. For example, 12 is sent as 1 (31h) followed by 2 (32h).
%D	Signed decimal value. This is the same as the %d character except it is preceded by a plus or minus sign.
%c	Byte value. For example, 12 is sent as formfeed (0Ch).
%C	Byte value with a zero added. For example, 6 is sent as \x36.
%l	16-bit value with the least significant byte first. For example, 12 is sent as Form Feed (0Ch) followed by NULL (00h).
%m	16-bit value with the most significant byte first. This is the same as %l except the order of the bytes is reversed.
%q	Unique hexadecimal value formatted for Toshiba and Qume devices.


Coordinate System

Unidriver uses a single, common horizontal and vertical (X, Y) coordinate system. The units in this coordinate system are called master units. Master units are the least common multiple of the various horizontal and vertical resolutions supported by the printer. The Unidriver can add, multiply, or divide a value by the specified master units to calculate the arguments for printer commands that use these coordinates.

Note  Many of the Units options that appear next to specified values are not in use at this time and do not require entries.

In cases where the master units are required, a special Units dialog box is provided for each printer command to specify how to convert from master units to the relevant printer units. For example, if the master units are 432 units/inch and the printer opens at 144 dpi, the master units must be divided by three to obtain the appropriate values for the printer.


Developing Windows NT Minidrivers

  Developing Windows NT Minidrivers

  Unidriver Optimization Information

  Using Windows 3.1 Minidrivers with Windows NT

  Creating a Minidriver

  Converting a Minidriver to Windows NT

  Setting up the Environment

  Creating Your Driver

  Compiling Your Driver

  Debugging and Tuning Your Driver

  Testing Your Driver


Unidriver Optimization Information

Unitool, version 3.06 is compatible with the Unidriver, although a number of file conversions are required to prepare the minidriver for use with it. The requirement for these conversions results from the major optimizations that have been incorporated to enhance the performance of the Unidriver as follows:

•	Handles rendering. The Unidriver retrieves the bitmap image the graphics engine creates and sends the bitmap to the printer.

•	Scans for rules. Rules are rectangular areas that the LaserJet printer can handle. Scanning for rules substantially reduces the volume of data sent to the printer. In some instances, this means a page that would otherwise be too large to fit into the printer's memory can be printed. It also permits a grid, such as in a spreadsheet, to be sent to the printer as a number of rules, thereby eliminating most of the graphics.

•	For the font metrics, the Unidriver uses the IFIMETRICS structure to provide the Windows NT version of the font metrics information which is preferred to the PFM files.

•	The Windows NT GPC extensions provide Windows NT-specific information about the printer that is later passed to GDI. In particular, the Windows NT GPC extensions data consists of color rendering (halftoning) information. The Windows NT GPC data also characterizes the printing mechanism. This data defines both the effective resolution of the printer and the default halftone pattern size to use. The NTGPC structure also identifies minidriver version, a size field and a field to indicate whether the minidriver uses IFIMETRICS or PFM.

Note  If the NTGPC structure is not included, the driver is assumed to be using the Windows 3.1 format.

•	Instead of the Windows 3.1 CTT, Windows NT uses the RLE format for glyph encoding. RLE fully supports Unicode because RLE does not have the 256-character limitation CTT contains. This is particularly important for the handling of non-latin based ideographic languages. The Unidriver can still use the old format (for compatibility with 16-bit minidrivers), but the RLE format caters to the wide characters of Unicode and speeds up CreateDC calls by having much of the font information precomputed in the format that is required by GDISRV.

•	.Inf files are required for installation and setup. The Windows NT DDK contains sample code for Setup including the \setup\printer\oemsetup.inf file.


Using Windows 3.1 Minidrivers with Windows NT

  Developing Windows NT Minidrivers

  Unidriver Optimization Information

  Using Windows 3.1 Minidrivers with Windows NT

  About Windows 3.1 Minidrivers

  NT RLE Character Mapping

  Using the RLE File Format

  NTGPC Data Extensions

  Character-Translation Table File Formats

  Creating a Minidriver

  Converting a Minidriver to Windows NT

  Creating a Minidriver

  Converting a Minidriver to Windows NT

  Setting up the Environment

  Creating Your Driver

  Compiling Your Driver

  Debugging and Tuning Your Driver

  Testing Your Driver


About Windows 3.1 Minidrivers

Because Unitool uses the same format of data for all Windows printer drivers, Windows 3.1 minidrivers are compatible and are supported by Windows NT on x86 and MIPS machines. When a Windows 3.1 minidriver is accessed by Windows NT, the file is mapped into memory. If the beginning of the file looks like a legitimate Windows file, the file is processed and the resources to use the driver directly are found.

The major difference between Windows NT and the Windows 3.1 minidriver is that the Windows 3.1 version provides call through between the GDI and the graphics engine. In Windows NT, the calls come directly through GDISrv into the Unidriver. In most cases, Windows NT treats the minidriver solely as a data resource.

Note  A Windows NT minidriver cannot be used in a Windows 3.1 environment.

Windows 3.1 minidrivers should be converted to Windows NT minidrivers because Windows 3.1 minidrivers running under Windows NT produce the following results:

•	The printer font metrics are provided using PFM files, which can slow processing on Windows NT. Because the Windows NT does not use PFM, these files should be converted to the IFIMETRICS format.

•	CreateDC is somewhat slower due to the font metrics conversion.

•	NT uses different internal formats to represent font metrics and translation tables from Unicode to the byte sequence to send to the printer. A substantial amount of conversion work is involved in using the Windows 3.1 data. Applications, such as Word for Windows, that call CreateDC numerous times are slowed considerably.

•	Converting to the Windows NT environment also increases memory consumption. Because the resource data cannot be used directly, the file must be mapped into memory. Memory must then be allocated to perform the font metric conversion. This allocated memory is required for the duration of the print operation.

•	Does not handle Unicode's 16-bit format or CTTs that have a 256 character limitation. Windows NT converts all CTT tables and generates RLE formatted data.

•	No callbacks are allowed. If detected at CreateDC (DrvEnablePDev), the CreateDC call will fail and the driver will not load.

•	The Unidriver accepts Windows 3.1 format data (even Window 3.1 binary drivers) with some restrictions, namely no callbacks.

Note  Callbacks are not allowed when a Windows 3.1 minidriver is used in a Windows NT environment.

Because of the disadvantages associated with using a Windows 3.1 minidriver on Windows NT, a Windows 3.1 minidriver that is to have a long term relationship with the Windows NT should be converted to the Windows NT.


NT RLE Character Mapping

To fully support Unicode, Windows NT has changed the format of the Windows 3.1 CTT to the new RLE format. The Unidriver (RasDD) can still use the old format (for compatibility with 16-bit minidrivers), but the RLE format supports the wide characters of Unicode and speeds up CreateDC calls by having much of the font information precomputed in the format required by GDISrv.

The CTT file contents can be saved into one of three formats. Unitool determines which one is to be used to save the CTT file based on the information that was entered as follows:

•	1-to-1 (byte to byte) translation (effectively a translation table). Each character code consists of a single byte. For simple remappings, the Unidriver sends the character value entered in the edit control each time the ASCII value shown.

•	2-to-1 (two bytes to one byte) translation. Each character code consists of either one or two characters. The Unidriver sends the first character value entered in the edit control, then uses either a backspace or x-movement command (as defined in the DI_BKSP_OK control) to move from the current position back to the original position. Then the Unidriver sends the second character to overprint the first. If NULL, the second character is not sent. This is used to overstrike characters, such as the slash and zero to produce a slashed zero.

•	Variable-length (byte to byte) string translation. Each character code consists of a variable length string containing printer commands that can change printer modes to gain access to a particular character, such as symbol set switching in the LaserJet family. The Unidriver sends the commands entered in the edit control when requested.

The differences between these formats is transparent to the user. Unitool creates the CTT in a format that results in the smallest file size depending on the actual translation. Printer commands sent from the CTT do not change the permanent state of the printer.

The Window NT equivalent of these is the RLE table. Because Unicode is a somewhat sparse mapping and real fonts are even sparser, there is a need to have the capability to return information about which glyphs are available in the font to GDISrv. This is done using the WCRUN structures defined in the winddi.h header file. To speed up CreateDC, RasDD uses these same structures in the minidriver. This means no time is spent building up tables that are static for a given printer.

The Windows NT Device Driver Development Kit (DDK) contains the source code for the ctt2rle.exe program that converts an existing Windows 3.1 CTT file and generates an NT RLE file. The conversion is done assuming that the Windows 3.1 character set provides the input mapping. Ctt2rle.exe requires only a single parameter, the file containing the CTT data. The output is written to a file with the same name, but with a .rle extension. Similar to Unitool, ctt2rle.exe uses the shortest format available to encode this information. The sample drivers in the DDK contain a batch file showing how ctt2rle.exe is used to convert existing files.


Using the RLE File Format

The ctt2rle.exe program assumes a Latin-based language. To handle Unicode, and especially non-latin, ideographic languages, a more complex format is needed. The file layout is defined by the structures located in the ntrle.h header file. The ctt2rle.exe source code shows how the various formats are built and how these formats can be used as a basis for a program to generate RLE data.

Note  GDISrv allows the driver a 32-bit handle to each glyph in the font. Basically, the FD_GLYPHSET structure contains the header information that describes how to reach into the glyph handle array of data returned by the driver to GDISrv. The driver is free to set the value within these 32 bits.

RasDD can use five different formats as follows:

#define RLE_DIRECT    10     /* Index + 1 or 2 data bytes       */

#define RLE_PAIRED    11     /* Index plus 2 bytes,  overstruck */

#define RLE_L_OFFSET  12     /* Length + 3 byte offset to data  */

#define RLE_LI_OFFSET 13     /* Length + Index + 2 byte Offset  */

#define RLE_OFFSET    14     /* Offset to (length; data)        */

These values specify the different methods used to pack data into the glyph handles and are taken from the ntrle.h header file.

The glyph handles contain two or three pieces of data depending upon the particular format. Each glyph handle contains a width table index and at least one byte of data to send to the printer. If only one or two bytes are to be sent to the printer, the RLE_DIRECT or RLE_PAIRED format is used. This format has a 2-byte index and one or two bytes of data. RLE_DIRECT contains one or two bytes of data to send. If there are two bytes of data, and the second one is not zero, the second one is sent immediately following the first. One use for this format is SHift JIS,  where many of the glyphs require two bytes to print. This format is defined by the RD structure in the ntrle.h header file. The RLE_PAIRED format also contains one or two bytes. If RLE_PAIRED contains two bytes RasDD is forced to backup after the first byte and print the second one. This corresponds to the overprinting mode of Windows 3.1.

If any of the glyphs require more than two bytes, one of the offset modes is required. There are three offset modes that are designed to reduce the size of the output file: RLE_L_OFFSET,  RLE_LI_OFFSET and RLE_OFFSET.

The most compact of these offsets is the RLE_LI_OFFSET mode. The data format is defined by the RLIC structure in the ntrle.h header file. In this format, there is a one-byte length field, a one-byte width table index, and two bytes used either as an offset OR as one or two bytes to send to the printer. If the length field is <= 2, the data is contained in the least significant one or two bytes. Otherwise, the least significant two bytes (considered a WORD) contains an offset to the data to send. This offset is relative to NTRLE structure located at the beginning of the file/resource. There is one obvious limitation to this mode: There can be no more than 256 glyphs in the font (due to the width table index size).

The RLE_L_OFFSET format is used when the above limitations rule out use of RLE_LI_OFFSET. This format consists of a length byte and a three-byte offset field. The offset is in the least significant three bytes of the handle, while the length field occupies the most significant byte. The offset is relative to the NTRLE structure at the start of the file/resource. The data at the offset must be WORD aligned (the least significant bit of the offset must be zero). The offset points to a WORD that is the width table index for this particular glyph, followed by the bytes to send to the printer. The number of bytes is contained in the most significant byte of the glyph handle.

The RLE_OFFSET format is the largest of the offsets. RLE_OFFSET simply consists of an offset into the file. This offset is relative to the NTRLE structure at the start of the file/resource. The offset must be WORD aligned and point at two words, followed by the bytes to send to the printer. The first word contains the length of the data string to send, the second WORD is the width table index.


NTGPC Data Extensions

The Windows NTGPC extensions provide Windows NT-specific information about the printer that is later passed to GDI. In particular, the Windows NTGPC extensions data consists of color rendering (halftoning) information made up of two major components. First, the COLORINFO structure is defined to characterize the printer's color rendering. The COLORINFO structure specifies information such as the purity of the printer's inks (how much cyan and magenta is in the yellow ink),  the actual color of the inks, and the gamma of the printer (how the intensity of the color changes as the amount of color is increased).

The other major component of the Windows NTGPC data characterizes the printing mechanism. This data defines both the effective resolution of the printer and the default halftone pattern size to use. In practice, the printer's stated resolution, such as 300 dpi, actually indicates only the positioning ability of the printer. To print correctly, the printer's effective resolution is also required because the actual dots the printer creates on the paper are often larger than the printer's stated resolution. For example, the LaserJet Series II has a stated positioning ability of 1/300th of an inch, but the actual dots are a slightly less than 1/200th of an inch. In this case, if every second dot is printed, more than 50 percent of the page appears to be covered in ink.

The effective resolution allows the halftoning code to compensate for these large dots and the image comes out at about the expected intensity. The halftone pattern size is set on a subjective basis to make the output look good. As the pattern size increases, the number of grey levels in the image increases (for a monochrome printer). The image resolution decreases as the halftoning operation effectively averages over larger chunks of the image.

The Windows NT DDK contains the ntgpcedt.exe program that specifies the NTGPC extensions data. The ntgpcedt.exe program reads data from a file and generates the required data structures in the desired file format. The structures used in the output file are described in the file ntres.h, that is also included in the DDK. Because the Unidriver (RasDD) accepts this file format, consider the ntgpcedt.exe program as the best means to produce GPC extensions data.


Character-Translation Table File Formats

A character-translation table is used by Microsoft Windows and the Microsoft Windows Universal Printer Driver to remap characters from the printer's native character and symbol set to the Windows ANSI set. The Universal Printer Driver will provide support for some of the common code pages and symbol sets, so that this data will not need to be redundant in a large number of individual printer drivers. It is intended that printer drivers supporting devices with less common code pages and symbol sets will contain their own character-translation table resources. Any given driver can mix and match either of these types of character-translation tables as needed. Character-translation tables provided by the Universal Printer Driver are referenced from the minidriver through negative numbers that correspond to the resource ID values (from the Universal Printer Driver), and character-translation tables provided by the minidriver are referenced by positive numbers corresponding to the resource ID values (from the minidriver).

Note  For a Windows NT minidriver, the RLE format for glyph encoding is provided instead of the characterization tables to better support Unicode because there is no 256 entry limitation. This is particularly important for that translation of non-Latin based languages. The Windows NT DDK provides the CCT2RLE program that converts the Windows 3.1 CCT format to the preferred RLE format. This enables you to generate the RLE using the current CCT structure.

Predefined Translation Tables

The Universal Printer Driver will provide support for some of the common code pages and symbol sets, and allow drivers to support less common ones. The list of character-translation tables currently supported by the Universal Printer Driver is as follows:

Translation Table	Description
CTT_CP437	Translate using IBM Code Page 437.
CTT_CP850	Translate using IBM Code Page 850.
CTT_WTYPE_BIG5	Use for Big 5 to Big 5 conversions.
CTT_WTYPE_CPJIS78	Use to convert a range of single byte or double byte characters into JIS78.
CTT_WTYPE_CPJIS83	Use to convert a range of single byte or double byte characters into JIS83.
CTT_WTYPE_CPJIS78_ANK	Use to convert a range of double byte characters into JIS78.
CTT_WTYPE_CPJIS83_ANK	Use to convert a range of double byte characters into JIS83.
CTT_WTYPE_NS86	Use to convert Chinese Big 5 to Industrial Standard Code.
TRANSTAB Structure

Three formats of character-translation tables are available. The first is a single byte-to-byte translation used for simple remappings. The second is a single byte-to-two bytes translation, where the second character is used to overstrike the first. The DI_BKSP_OK flag determines how the cursor should be repositioned to overstrike the second character. The third allows a single byte-to-variable length string that may contain commands to change symbol sets, or whatever else is necessary, to create the desired character. This difference between these formats is transparent to the user, but UniTool creates the character-translation table in the format resulting in the smallest file size depending upon the actual translations specified by the user. Any printer commands sent from the CTT cannot change the permanent state of the printer.

typedef struct {

    WORD    wType;

    BYTE    chFirstChar;

    BYTE    chLastChar;

    union

        {

        short    psCode[1];

        BYTE     bCode[1];

        BYTE     bPairs[2][1];

        } uCode;

} TRANSTAB;

Members

wType

Translation table type. It can be one of these values:

Value	Meaning
CTT_WTYPE_COMPOSE	uCode is an array of 16-bit offsets from the beginning of the file pointing to the strings to use for translation. The length of the translated string is the difference between the next offset and the current offset. Please note that an additional offset is needed (dfLastChar + 1) to provide a means to read the length of the string for the translation of the last character.
CTT_WTYPE_DIRECT	uCode is a byte array of one-to-one translation table from chFirstChar to chLastChar.
CTT_WTYPE_PAIRED	uCode contains an array of paired, unsigned bytes. If only one character is needed to do the translation, then the second byte is zero, otherwise the second byte is struck over the first byte.
chFirstChar

First character in character-translation table.

chLastChar

Last character in character-translation table.


Creating a Minidriver

The version of Unitool shipped with this DDK is a 16-bit application. Consequently, Unitool does not operate satisfactorily without some preparation of the resource files. The sample.RC files provided with the DDK cannot be read by Unitool, so if you want to use the sample files as a template for a new minidriver, you must use the .W31 files. When you have finished using Unitool to enter pertinent printer and font data, you must convert the .PFM files to .IFI files (refer to "Using Windows 3.1 Minidrivers with Windows NT" and "Converting a Minidriver to Windows NT" for additional information) and also convert the .CTT files to .RLE files (see "NT RLE Character Mapping" and "Using the RLE File Format" for information).

You will also need to run ntgpcedt.exe, a program that specifies the NTGPC extensions data. Refer to "NTGPC Data Extensions."

The following steps outline the procedure for creating a new minidriver while using one of the samples as a template.

Note  The following procedure uses the epson9 sample files as an example template.

1.	Create a destination directory for the new minidriver files.

2.	Copy the following directories from the DDK sample files to the destination directory created in step 1:

•	\src\print\epson9\ifi

•	\src\print\epson9\pfm

•	\src\print\epson9\ctt

•	\src\print\epson9\rle

 	That is, if your destination directory is named MYDRIVER, you will now have the following directories:

•	...\MYDRIVER\ifi

•	...\MYDRIVER\pfm

•	...\MYDRIVER\ctt

•	...\MYDRIVER\rle

3.	Delete the .IFI files from your ......\MYDRIVER\ifi directory and the .RLE files from the ......\MYDRIVER\rle directory created in step 2.

4.	Start Unitool and choose File/Open. Enter ...\src\print\epson9\epson9.w31 in the File Name: text box and click OK. Unitool opens the Printer Data, Fonts, and CTT windows which contain information extracted from the epson9.w31 file.

You may get a message box stating that the file is read-only; click OK since you won't need to overwrite the epson9.w31 file.

At this point you can do a File/SaveAs to create a new file for your minidriver. Enter the pathname of the destination directory (created in step 1) and name of the new driver (using the form <driver_name>.RC)in the File Name: list box.

Unitool writes the following files to the \MYDRIVER directory:

•	<driver_name>.RC

•	<driver_name>.GPC

•	<driver_name>.RC$

5.	Set up the minidriver's Printer Data window. You can start by opening the Model Data dialog box (choose Printer Data/ModelData) and deleting the unsupported models provided by the sample .W31 file you opened in step 3. For example, you could delete all but the "Epson Compatible 9 Pin" model and use this as the template for the models included in your minidriver.

 	Make the changes in each of the following dialog boxes accessed under the Printer Data menu, as appropriate for your minidriver:

•	MiniDriver Data dialog box

•	Page Control dialog box

•	Cursor Movement dialog box

•	Paper Sizes dialog box

•	Paper Sources dialog box

•	Paper Destinations dialog box

•	RESOLUTION dialog box

•	Compression dialog box

•	Color Models dialog box

•	Rectangle Fill dialog box

•	Font Cartridges dialog box

•	Font Simulation dialog box

•	Download Information dialog box

The Validate Dialog Boxes function on the Options menu can be selected to automatically validate each entry. When this function is active, a dialog box is selected, and OK, Next, or Previous is selected (a choice that causes the current dialog box contents to be saved rather than ignored. Unitool performs limited error checking on the contents of that dialog box and if any potential problems are found, a dialog box warning of problems is displayed. These warnings can be ignored or the dialog box can be displayed to correct the errors. If the Validate Dialog Boxes command is not selected, error checking does not occur. This command is enabled by default. For more information, see Unitool Error Messages.

In addition, Validate Now! on the Options menu can be selected to perform limited error checking on the contents of the currently loaded minidriver file. If any potential problems are found, a dialog box listing them is displayed.

Note  Subsequent topics provide information relating to the setting of the minidriver's Printer Data window. Each topic provides a specific, detailed description for each category of information that can be set up in the minidriver's Printer Data window. Each topic also offers recommended values that can be entered based on the type of source minidriver to be built. For example, the page-control commands section recommends values to enter for the Diconix 150 Plus printer and for the HP LaserJet IIP.

6.	When all the Printer Data entries have been made, you can edit the .PFM files in the FONTS window and the CCT files in the CCT window. You only need to edit those files that relate to fonts and character translation tables supported by your printer.

You may need to close your <driver_name>.RC file in Unitool and edit this file with your text editor to add/delete the names of .PFM files as appropriate for your driver (these will be converted to .IFI files later). You may also need to name the .CTT files you are using and delete any .RLE filenames (the .CTT files willl be converted to .RLE files later).

7.	When all changes are complete in the FONTS and CCT windows. exit Unitool and proceeed with "Converting a Minidriver to Windows NT" to convert the minidriver to Windows NT format.


Converting a Minidriver to Windows NT

Converting a minidriver to the Windows NT format requires the pfm2ifi.exe, ctt2rle.exe, and ntgpcedt.exe programs (available in the Windows NT DDK) to generate the NTGPC data extensions.

To convert the minidriver:

1.	Open a command window and move to the directory containing the binary files provided with the DDK and run the pfm2ifi.exe program to convert the PFM files you crated with Unitool and generate the files in the IFIMETRICS format.

The command to convert a .PFM file is:
pfm2ifi <pathname>.pfm <filename>.ifi [-v]

The pathname is the path and filename of the .PFM file to be converted. The -v option prints the converted metrics to the standard output device.

2.	Run the ctt2rle.exe program to convert the CTT files you created with Unitool and generate these files in the RLE format.

The command to convert a .CTT file is:
ctt2rle <pathname>.ctt

The pathname is the path and filename of the .CTT file to be converted. The created .RLE file will be written to the same directory as the .CCT file.

3.	Move the newly created .RLE files to your ...\rle directory.

4.	Open the MYDRIVER.RC file with a text editor. Immediately under the

RC_TABLES    PRELOAD  MOVEABLE    MYDRIVER.RC

line, add the following line and close the file.

RC_TABLES    PRELOAD  MOVEABLE    NT.GPC

5.	Run the ntgpcedt.exe program and open your .RC file (MYDRIVER.RC in this example).

6.	Make any appropriate changes to the  color calibration data, halftone, and pixel values displayed in the NT GPC Editor dialog box and select Close. Choose Yes in response to the "Save updated NT GPC data to 'NT.GPC'?" message box and the data is saved to the NT.GPC file for your driver.

7.	Type Build to build the minidriver DLL file. Refer to Setting up the Environment, Creating Your Driver, and Compiling Your Driver for details on the build environment and process.

9.	Test and implement the minidriver. Refer also to "Debugging and Tuning Your Driver" and "Testing Your Driver."

Note  Sample minidrivers are provided in the Windows DDK to demonstrate the input and output files the minidrivers produce during conversion.


Setting up the Environment

The graphical Microsoft® Windows NT™ DDK Setup program creates a program group called Windows NT Device Driver Kit. Among other items, this program group contains items called Free Build Environment and Checked Build Environment. These items call setenv.bat to create a build environment with correct environment variables.

Manual installation does not create this program group. You can call setenv.bat manually, using the following syntax:

setenv <destination> [free | checked]

The <destination> argument specifies the directory where the DDK was installed. The optional second argument specifies the target build environment; the default type is free.


Creating Your Driver

The DDK includes sample source code for many Windows NT drivers that you can use as a base for your own driver development. Choose the driver that most closely matches your device and spend some time analyzing and experimenting with it. The Win32 SDK provides many tools, including a customizable text editor, that you can use to modify sample code, as well as to write your own drivers from scratch. See the Win32 SDK documentation for more details on the text editor and other development tools.


Compiling Your Driver

Windows NT DDK drivers are built using the build utility, which uses a set of rules and project files which specify how drivers should be created.

The dirs file specifies which directories in the subtrees contain source code files which are to be built. The sources file specifies which source files are required to build the current driver.

If your driver will consist of multiple binaries, or the source will be kept in multiple directories, you may need to create a dirs file specifying which directories are to be built and in what order. Each separate binary will require a sources file describing which files are to be compiled/linked to create the driver.

Each driver directory also contains a makefile. As build spawns the nmake utility for each source file listed in sources, nmake uses the makefile to generate dependency and command lists. The standard makefile in a driver source code directory directs nmake to the master nmake macro definition file, makefile.def. This file defines the flags for the build tools such as the compiler and linker. makefile.def simplifies the creation of platform-independent driver projects and is similar to the ntwin32.mak file in the Win32 SDK.

Once you have your dirs, sources and makefile files created, the next step is to run build. Build will parse the sources file and spawn nmake for each source file. Nmake will evaluate the macros in makefile.def and spawn the C compiler with the proper switches. After the compile stages are completed, build will spawn nmake again to link the objects and complete the driver building phase.

If your sources file is correct, running build is all that is required to compile and link your driver. Using build and makefile.def removes the guesswork from such things as which compiler switches are required, and what arguments the linker requires. By adding the appropriate defines to the sources file, it is possible to control the build options in a platform-independent fashion.

During driver development you will need to build free and checked versions of your driver. This is controlled by environment variable settings which are interpreted by build and nmake. These variables are set by setenv.bat, as discussed previously. To build a free driver, run build from the free environment. To build a checked driver, run build from the checked environment.

Template files (.tpl) for dirs, sources, makefile, and other files can be found in the \<destination>\doc directory. Working versions of these files can be found in driver source subdirectories of the DDK. Examining these files along with makefile.def (located in the \<destination>\inc directory) will provide additional information.

For more information about the build utility, see the Programmer's Guide topic in the DDK Help online documentation.


Debugging and Tuning Your Driver

During driver development and testing, you will need to adjust the registry of your Windows NT development and test machines. You will need to enable/disable driver loading, add/modify registry keys and values, and so on.

Windows NT provides an application for this purpose called Registry Editor. Registry Editor (regedt2.exe) is documented in the Windows NT documentation.

Additionally, the DDK includes two registry tools, regini and regdmp, which are script-driven. These tools provide a "-?" option, which provides help from the command line. Regdmp dumps the contents of the registry to a script file. Regini creates registry entries according to the specified script. Sample regini script files can be found in several driver source directories in the DDK.

The methods available for driver debugging center around the kernel debugger and the checked build, both of which have already been discussed in some detail. Additional information about the kernel debugger is available in the Win32 SDK documentation and the Programmer's Guide topic of the DDK Help online documentation.

Some debugger extensions have also been included for the Windows NT STREAMS (strmexts.dll), Windows NT GDI (gdiexts.dll) and Windows NT USER (userexts.dll) components. These are installed and placed in your path by DDK Setup, to be used while debugging.

Performance tuning is covered in the Win32 SDK documentation and in the Programmer's Guide topic of the DDK Help online documentation. The DDK includes a sample illustrating performance counters that is based on the VGA display driver; this sample is found in the src\perf directory of the DDK.

Also included are the utilities that are useful for quickly loading performance counter information into the registry, lodctrs and unlodctrs. The tools are script-driven and are documented in the Programmer's Guide topic of the DDK Help online documentation.

Other useful tools include the ObjDir and Drivers tools, which provide information about objects in the system and what resources drivers have created, own, or are using. The ObjDir tool is similar to the WinObj tool that is included with the Win32 SDK, except it is console based. The Drivers tool provides a listing of what drivers are loaded in the system and their resource usage.


Testing Your Driver

The DDK includes several groups of tests from the Microsoft Hardware Compatibility Test (HCT) Suite. These tests are found in the \hct directory of the DDK CD-ROM. They can be installed by running setup.exe in that directory.

Setup installs the HCT testing shell and, optionally, several groups of tests that will exercise the system while loading your driver to help you uncover problem areas.

Many of the HCT tests are documented in the Programmer's Guide topic of the DDK Help online documentation. A readme file in the \hct directory provides additional details about disk and hardware requirements, as well as more information on Setup and Install.

Note  You should use the -ddk switch when using Setup to install the HCT tests. These tests should first be run using the checked build to aid driver debugging. They should be run again for final verification on the free build.

Microsoft Compatibility Labs (MCL) uses a superset of these tests to certify Windows NT-compliant drivers. Passing the included DDK HCT tests is a positive sign that your driver is stabilizing and nearly ready for certification.


Master Units and Minidriver Data

  Master Units and Minidriver Data

  About Master Units and Minidriver Data

  MiniDriver Data Dialog Box


About Master Units and Minidriver Data

Unidriver uses a single, common horizontal and vertical (x,y) coordinate system. The units in this coordinate system are called master units and are the least common multiple of the various horizontal and vertical resolutions supported by the printer. The minidrivers add, multiply, or divide a value by the specified master units to calculate the arguments for printer commands that use these coordinates.


MiniDriver Data Dialog Box

Select MiniDriver Data from the Printer Data menu to use the MiniDriver Data dialog box to specify a GPC specification version number, a minidriver version number, the horizontal and vertical master units, the printer's technology, and the absence or presence of a private help file as needed.

Major Revision (GPC Specification Version Number)

Major Revision contains the version number of the GPC specification that applies to the minidriver. The GPC specification refers to the format of data resources contained in the minidriver. For current minidrivers, including the Diconix 150 Plus and the HP LaserJet IIP, the version number is 3.

Minor Revision (Minidriver Version Number)

Minor Revision contains the version number of the minidriver. This value can be any integer between 0 and 255.

If the driver is installed, changing this value and rebuilding the minidriver causes the Unidriver to rebuild the driver's font-summary file. Unitool builds a font-summary file for each printer that can download soft fonts using a font installer (as with the HP LaserJets and HP DeskJets). The font-summary file contains a list of fonts currently available for a particular printer model, including the internal and downloadable fonts.

Diconix 150 Plus: Use 1 for the first version of the minidriver.

HP LaserJet IIP: Use 41 for the forty-first version of the minidriver.

X Master Units

X Master Units specifies the horizontal master unit, which is the least-common multiple of the selected horizontal cursor-movement command and the supported graphics resolutions.

For the Diconix printer, the horizontal master unit is 960 dpi (dots per inch). This value is the least-common multiple of the following graphics and cursor-movement resolutions:

•	80-dpi  (normal/expanded-mode graphics)

•	160-dpi  (normal/expanded-mode graphics)

•	320-dpi  (normal/expanded-mode graphics)

•	12-cpi  (default font-character width)

A minidriver typically supports three graphics resolutions: low, medium, and high. For the Diconix printer, there are four horizontal graphics resolutions: 80, 96, 160, and 320. 96 dpi is not used because the resolution does not factor evenly into any of the others, but the remaining three values (80, 160, and 320) support horizontal graphics resolutions. For the HP LaserJet IIP printer, each of the supported graphics resolutions (75, 150, and 300) factor evenly into the specified least-common multiple of 300.

Many dot-matrix and laser printers support commands that move the printhead or cursor horizontally across the page. For the dot-matrix printers that do not, the Unidriver uses the space character from the narrowest printer font to move the printhead or cursor horizontally across the page. For more information, see Control Information.

Because Diconix printer falls into the latter category, the space character from the narrowest printer font (12 pitch font) is selected as the horizontal space command. This means the resolution of the horizontal cursor-movement command for the Diconix printer is 1/12th of an inch.

Diconix 150 Plus: Use 960.

HP LaserJet IIP: Use 300.

Y Master Units

Y Master Units specifies the vertical master unit. This value is the least-common multiple for the line spacing command and the vertical resolution for graphics output.

For the Diconix printer, the vertical master unit is 576 dpi. This value is the least common multiple of the following line spacing and graphics resolutions:

•	1/288-inch (line spacing)

•	1/96-inch (normal-mode graphics)

A minidriver for a dot-matrix printer typically supports three graphics resolutions: low, medium, and high. For the Diconix printer, there are only two vertical graphics resolutions. When possible, select the lower resolution (96 dpi). The higher resolution requires the factory settings to be altered and results in slower printer (requires interlaced graphic output in the y-direction). Minidrivers ideally support the default switch settings for printer, although this is not always possible.

The Diconix printer supports six line-spacing commands that provide the following vertical resolutions:

•	1/8-inch (line spacing)

•	7/72-inch (line spacing)

•	7/96-inch (line spacing)

•	1/6-inch (line spacing)

•	n/216-inch (line spacing)

•	n/288-inch (line spacing)

Of these resolutions, the finest (288 dpi) was chosen for the Diconix.

Diconix 150 Plus: Use 576. This is the least common multiple of the 1/288 inch Line Spacing command and the 1/96 inch vertical graphics resolution.

HP LaserJet IIP: Use 300.

For the HP LaserJet IIP, the resolution for the line-spacing command and the vertical resolution for graphics output are equivalent at 300 dpi (the aspect ration is 1:1).

Note  A printer's aspect ratio is the ratio formed by the x- and the y-printer resolution values. For many printers, the aspect ratio is 1. For example, the HP LaserJet IIP supports a 300 dpi resolution in both the vertical and horizontal directions. For the Diconix printer, the aspect ratio is 3.333 (320/96) for the highest resolution. To produce the highest quality, avoid using aspect ratios greater than 2.

Update References

Update References indicates whether Unitool is to update each of the measurement values (graphics resolutions, paper sizes, unpintable-region dimensions, line-feed values, and so on) that are specified in master units, in each of the related data structures. Check this control and click OK for UniTool to update all measurements. If left blank, UniTool leaves the original measurement values. If some of the measurements do not factor evenly into the new master units and the Update References box is checked, UniTool issues an error message that identifies the faulty value.

fTechnology (Printer Technology)

fTechnology contains a list of values that identify device technologies used by the printer:

Value	Meaning
GPC_TECH_DEFAULT	Printer does not use any of the other technologies in the list.
GPC_TECH_PCL4	HP PCL Level 4 or above
GPC_TECH_CAPSL	CaPSL Level 3 and above
GPC_TECH_PPDS	PPDS printer language
GPC_TECH_TTY	TTY-type printer
GPC_TECH_DBCS	FE (Far East) page printer
Select the value from the list that corresponds to the device technology for your printer.

Diconix 150 Plus: The GPC_TECH_PCL4 box is not checked.

HP LaserJet IIP: The GPC_TECH_PCL4 box is checked.

fGeneral

(Not supported; no boxes should be checked.)


Control Information

  Control Information

  About Control Information

  Page Control Dialog Box

  Cursor Movement Dialog Box


About Control Information

Unidriver sends page-control commands to the printer to begin a document, to begin a page, to end a document, to end a page, to cancel a print job, and so on. Unidriver sends cursor-movement commands to the printer to move the cursor or print head horizontally across the page, vertically down (and sometimes up) the page, and so on.

A number of sets of page-control and cursor-control commands can be set up for the minidriver. To specify the page-control commands, select Control Info from the Printer Data menu. then select PageControl to display the initial Page Control dialog box. To specify cursor-movement commands, select Control Info from the Printer Data menu. Then select CursorMove to display the initial Cursor Movement dialog box.


Page-Control Dialog Box
Page Control Dialog Box

Select Control Info/PageControl... from the Printer Data menu to access the Page Control dialog box. The Page Control dialog box specifies the page-control commands and the priority order the Unidriver uses to send the commands to the printer.

Note  The fGeneral dialog box accessed from the Page-Control dialog box is not used in the current implementation of Unitool. You can ignore it.

When you finish entering data in the Page Control dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

The page-control commands appear in the text boxes near the center of the Page Control dialog box. Use the scrollbar to access the list boxes and locate the required commands and define them. When complete, indicate the priority order for sending commands numerically in the Order group box near the top of the dialog box.

PC_OCD_BEGINDOC

The PC_OCD_BEGINDOC command is issued to begin printing a document. For example, commands sent at the beginning of a document the cursor or print head to the upper-left corner of a page, clear the printer's buffers, initialize the printer configuration to a known state, and perform any related tasks. Some common PC_OCD_BEGINDOC commands are the printer reset, carriage return, buffer clear, top-of-form, character set selection, and so on. In addition, less-common (and less-obvious) commands for particular printers are also sometimes set. For example, a raster printer may require unique dip switch settings for foreign character sets. In this case, additional PC_OCD_BEGINDOC commands are inserted to take these settings into account.

Diconix 150 Plus: Use the Reset command (ESC@) to return the printer to the default conditions specified by the current dip switch settings. Use the Cancel command (ESCM) to delete all data from the print buffer.

To specify the Reset and Cancel combination, type the following in the PC_OCD_BEGINDOC box:

\x1B@\x1BM

HP LaserJet IIP: Use the Reset command (ESCE) to return the printer to its default settings and the Perforation Skip command (ESC&l0L) to disable the printer's perforation skip feature.

To specify the Reset and Perforation Skip combination, type the following in the PC_OCD_BEGINDOC box:

\x1BE\x1B&l0L

PC_OCD_BEGINPAGE

The PC_OCD_BEGINPAGE box command is issued before printing each page of a document. For some printers, the PC_OCD_BEGINDOC command can be a single carriage return. For other printers, other commands must also be sent.

Diconix 150 Plus: Use the Carriage Return command (0x0d) to return the cursor or print head to the left edge of the page.

To specify the command, type the following in the PC_OCD_BEGINPAGE box:

\x0D

HP LaserJet IIP: No command is required at the beginning of a new page.

PC_OCD_DUPLEX_ON

The PC_OCD_DUPLEX_ON command enables duplex (double-sided) printing.

Note  The Unidriver does not process the duplex-on command unless the MD_DUPLEX box is checked in the fGeneral dialog box on the Printer Model Data dialog box.

Diconix 150 Plus: Does not support duplex printer. The PC_OCD_DUPLEX_ON box is empty.

HP LaserJet IIP: The PC_OCD_DUPLEX_ON box is empty.

Two separate commands are required to enable duplex printing; the PC_OCD_DUPLEX_ON and PC_OCD_DUPLEX_HORZ commands. One command enables duplex printing in portrait mode. The other enables it in landscape mode.

PC_OCD_ENDDOC

The PC_OCD_ENDDOC box command ends a document. The carriage return is a common end-document command that positions the cursor in the left margin. Other end-document commands vary from printer to printer, although the printer is typically returned to its original (or default) state.

Diconix 150 Plus: Use the Carriage Return (0x0d) command.

To specify the Carriage Return command, type the following in the PC_OCD_ENDDOC box:

\x0D

HP LaserJet IIP: Use the Reset command (\x1BE) to reset the printer to its default settings.

To specify the Reset command, type the following in the PC_OCD_ENDDOC box:

\x1BE

PC_OCD_ENDPAGE

The PC_OCD_ENDPAGE command ends a page.

Diconix 150 Plus: No command is required. The PC_OCD_ENDPAGE box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

PC_OCD_DUPLEX_OFF

The PC_OCD_DUPLEX_OFF command disables duplex (double-sided) printing.

Diconix 150 Plus: Does not support duplex printing. The PC_OCD_DUPLEX_OFF box is empty.

HP LaserJet IIP: Use the Duplex Off command (ESC&l0S).

To specify the command, type the following in the PC_OCD_DUPLEX_OFF box:

\x1B&l0S

PC_OCD_ABORT

The PC_OCD_ABORT command cancels the current document.

Diconix 150 Plus: Use the Reset command (ESC@) to return the printer to its default settings and the Cancel command (ESCM) to delete all data from the print buffer.

To specify the Reset and Cancel combination, type the following in the PC_OCD_ABORT box:

\x1B@\x18

HP LaserJet IIP: Use the Reset command (ESCE) to return the printer to its default settings.

To specify the Reset command, type the following in the PC_OCD_ABORT box:

\x1BE

PC_OCD_PORTRAIT

The PC_OCD_PORTRAIT command enables the printer to render output in portrait mode. A printer supports the portrait-mode command only if the printer also supports device fonts for both portrait and landscape modes.

Diconix 150 Plus: Does not support this command.. The PC_OCD_PORTRAIT box is empty.

HP LaserJet IIP: Use the Portrait Orientation command (ESC&l0O).

To specify the command, type the following in the PC_OCD_PORTRAIT box:

\x1B&l0O

PC_OCD_LANDSCAPE

The PC_OCD_LANDSCAPE command enables the printer to print output in landscape mode. A printer supports the landscape-mode command only if the printer also supports device fonts for both portrait and landscape modes.

Diconix 150 Plus: Does not support commands that set the page orientation. The PC_OCD_LANDSCAPE box is empty.

HP LaserJet IIP: Use the Landscape Orientation command (ESC&l1O).

To specify the command, type the following in the PC_OCD_LANDSCAPE box:

\x1B&l1O

PC_OCD_MULT_COPIES

The PC_OCD_MULT_COPIES command enables multiple copies of a document to be printed.

Note  The Unidriver does not process the multiple-copies command unless the MD_COPIES box is checked in the fGeneral dialog box on the Printer Model Data dialog box.)

Diconix 150 Plus: Does not support a command that enables multiple-copy printing. The PC_OCD_MULT_COPIES box is empty.

HP LaserJet IIP: Use the Number of Copies command (ESC&lnX) to print n copies of a document.

To specify the command, type the following in the PC_OCD_MULT_COPIES box:

\x1B&l%dX

PC_OCD_DUPLEX_VERT

The PC_OCD_DUPLEX_VERT command enables vertical-duplex printing. When pages are printed in vertical-duplex mode, each is printed to permit the top and bottom edges of consecutive pages to be bound. When pages are printed in horizontal-duplex mode, each is printed to permit the left and right edges of consecutive pages to be bound.

Diconix 150 Plus: Does not support this command. The PC_OCD_DUPLEX_VERT box is empty.

HP LaserJet IIP: Use the Vertical Duplex command (ESC&l1S).

To specify the command, type the following in the PC_OCD_DUPLEX_VERT box:

\x1B&l1S

PC_OCD_DUPLEX_HORZ

The PC_OCD_DUPLEX_HORZ command enables horizontal-duplex printing.

Diconix 150 Plus: Does not support duplex printing. The PC_OCD_DUPLEX_HORZ box is empty.

HP LaserJet IIP: Use the Horizontal Duplex command (ESC&l2S).

To specify the command, type the following in the PC_OCD_DUPLEX_HORZ box:

\x1B&l2S

PC_OCD_PRN_DIRECTION

The PC_OCD_PRN_DIRECTION command sets the direction of the text relative to the current graphic orientation at 90 degree increments.

Diconix 150 Plus: Does not support the text direction. The PC_OCD_PRN_DIRECTION box is empty.

HP LaserJet IIP (HPPCL5 only): Use the text rotation command (ESC&a%dP).

To specify the command, type the following in the PC_OCD_PRN_DIRECTION box:

\x1B&a%dP

PC_OCD_JOB_SEPARATION

(Not currently supported)

Maximum Number of Copies

Max # Copies specifies the maximum number of copies that the user can request.

Diconix 150 Plus: If a printer does not support multiple copies, this box can be left empty. For clarity, however, this box contains 1 for the Diconix minidriver.

HP LaserJet IIP: Allows a maximum of 99 copies (99 is the default).

Order Group Box

The Order group box contains 16 controls that specify the order of the page-control commands. Some printers, such as the Hewlett-Packard printers that use PCL, require a specific ordering of the page-control commands to process pages correctly. Other printers, such as the Diconix, work satisfactorily using the default ordering. The default values begin with 1 in the upper-left corner and proceed down the left column, to the top of the right column, and then down the right column.

Diconix 150 Plus: Use the default values.

HP LaserJet IIP: Requires the unique ordering of the commands as specified in the following list:

1.	PC_ORD_BEGINDOC

2.	PC_ORD_PAPER_SOURCE

3.	PC_ORD_PAPER_SIZE

4.	PC_ORD_ORIENTATION

5.	PC_ORD_RESOLUTION

6.	PC_ORD_MULT_COPIES

7.	PC_ORD_DUPLEX

8.	PC_ORD_DUPLEX_TYPE

9.	PC_ORD_BEGINPAGE

General Page Control Dialog Box

This dialog box is not used in the current implementation of Unitool.


Cursor-Movement Dialog Box
Cursor Movement Dialog Box

Each printer provides a unique set of commands that control the vertical and horizontal movement of the cursor or print head across the page. These commands are called cursor-movement commands. Some of these commands move the cursor with respect to the current position, or with respect to the page origin, and require information about the distance to be moved. Some of these commands move the cursor a fixed distance. These commands include the carriage return, linefeed, and formfeed. On some printers, the cursor-movement commands are somewhat primitive; for example, horizontal movement can only be achieved by sending a space character from a particular font. On other printers, a single command is available to move the cursor in both horizontal and vertical direction. The coordinate system used by cursor movement commands is based on the origin at the upper-left corner of the page. "Positive" movement is considered to be moving down the page (for y-movement commands), or moving to the right (for x-movement commands).

Select Control Info/CursorMove... from the Printer Data menu to access the Cursor Movement dialog box. The Cursor Movement dialog box contains controls in which you specify the cursor-movement commands and other related information that the Universal Printer Driver requires.

Define the cursor-movement commands in the list box at the top of the Cursor Movement dialog box. Use the scroll bar to scroll through the list boxes and locate the needed commands. When complete, indicate the printer horizontal and vertical movement capabilities using the fXMove and fYMove capability bitwords.

Note  For some of the following commands, the corresponding Units dialog box contains values that the Unidriver uses to calculate the argument(s) for the related command as specified.

CM_OCD_XM_ABS

The CM_OCD_XM_ABS command defines the horizontally cursor movement with respect to the page origin.

Diconix 150 Plus: Does not support this command. The CM_OCD_XM_ABS box is empty.

HP LaserJet IIP: Use the Horizontal Cursor Positioning command (ESC*pnX). The variable n specifies a horizontal distance in 1/300 inch units.

To specify the command, type the following in the CM_OCD_XM_ABS box:

\x1B*p%dX

CM_OCD_XM_REL

The CM_OCD_XM_REL command defines the horizontal cursor movement with respect to the current position. By default, the Unidriver assumes that the CM_OCD_XM_REL command moves the cursor to the right of the current position.

If your printer uses a command that allows movement to either the left or right of the current position, set the CM_XM_REL_LEFT bit in the CURSORMOVE fXMove dialog box.

Diconix 150 Plus: Does not support this command. The CM_OCD_XM_REL box is empty.

HP LaserJet IIP: Use the Horizontal Cursor Positioning command (ESC*p+nX). The plus sign (+) indicates that the movement is in the positive x-direction relative to the current cursor location. The variable n specifies a distance in 1/300 inch units.

To specify the command, type the following in the CM_OCD_XM_ABS box:

\x1B*p+%dX

CM_OCD_XM_RELLEFT

The CM_OCD_XM_RELLEFT command defines the horizontal cursor movement in the negative x-direction relative to the current cursor position. This command is provided for printers that support different cursor-movement commands.

Diconix 150 Plus: Does not support this command. The CM_OCD_XM_RELLEFT box is empty.

HP LaserJet IIP: Use the Horizontal Cursor Positioning command (ESC*p-nX). The minus sign (-) indicates that the movement is in the negative x-direction relative to the current cursor location. The variable n specifies the distance of movement in 1/300 inch units.

To specify the command, type the following in the CM_OCD_XM_RELLEFT box:

\x1B*p-%dX

CM_OCD_YM_ABS

The CM_OCD_YM_ABS command defines the vertical cursor movement with respect to the page origin.

Diconix 150 Plus: Does not support this command. The CM_OCD_YM_ABS box is empty.

HP LaserJet IIP: Use the Vertical Cursor Positioning command (ESC*pnY). The variable n specifies the distance of movement in 1/300 inch units.

To specify the command, type the following in the CM_OCD_YM_ABS box:

\x1B*p%dY

CM_OCD_YM_REL

The CM_OCD_YM_REL command defines the cursor movement in the positive y-direction with respect to the current position.

Diconix 150 Plus: Use the Immediate Line Feed command (ESCJn) to move the cursor by n units in the positive y-direction with respect to the current cursor location. The variable n specifies the distance of movement in 1/288 inch units.

To specify the command, type the following in the CMD_OCD_YM_REL box:

\x1BJ%c

HP LaserJet IIP: Use the relative Vertical Cursor Positioning command (ESC*p+nY) to move the cursor by n units in the positive y-direction with respect to the current cursor location. The variable n specifies the distance of movement in 1/300 inch units.

To specify the command, type the following in the CMD_OCD_YM_REL box:

\x1B*p+%dY

CM_OCD_YM_RELUP

The CM_OCD_YM_RELUP command defines the cursor movement in the negative y-direction with respect to the current position.

Note  The minidriver cannot use the CM_OCD_YM_RELUP cursor movement command with a nonlaser printer.

Diconix 150 Plus: Does not support this command. The CM_OCD_YM_RELUP box is empty.

HP LaserJet IIP: Use the relative Vertical Cursor Positioning command (ESC*p-nY) to move the cursor by n units in the negative y-direction with respect to the current cursor location. The variable n specifies the distance of movement in 1/300 inch units.

To specify the command, type the following into the CMD_OCD_YM_REL box:

\x1B*p-%dY

CM_OCD_YM_LINESPACING

The CM_OCD_YM_LINESPACING command sets the line spacing increment value that occurs at each linefeed.

In addition, click the Units button to display the Units dialog box and add the sMax (maximum) values and sMin (minimum) values for command arguments in 1/288 inch increments.

Diconix 150 Plus: Use the Line Spacing command (ESC3n). The variable n specifies a line spacing value in 1/288 inch increments.

To specify the command, type the following in the CM_OCD_YM_LINESPACING box:

\x1B3%c

HP LaserJet IIP: Does not support this command. The CM_OCD_YM_LINESPACING box is empty.

CM_OCD_XY_REL

(This command is not supported by the Unidriver.)

CM_OCD_XY_ABS

The CM_OCD_XY_ABS box contains the printer command or commands that move the cursor vertically and horizontally with respect to the page origin. Click the Units button to display the Units dialog box, which contains values that must be added to command arguments, maximum values for command arguments, and minimum values for command arguments. This command is not supported by the Unidriver.

CM_OCD_CR

The CM_OCD_CR command defines a carriage return.

Diconix 150 Plus: Use the Carriage Return command (0x0D).

To specify the command, type the following in the CM_OCD_CR box:

\x0D

HP LaserJet IIP: Use the Carriage Return command (0x0D).

To specify the command, type the following in the CM_OCD_CR box:

\x0D

CM_OCD_LF

The CM_OCD_LF command defines a linefeed.

Diconix 150 Plus: Use the Line Feed command (0x0A).

To specify the command, type the following in the CM_OCD_LF box:

\x0A

HP LaserJet IIP: Use the Line Feed command (0x0A).

To specify the command, type the following in the CM_OCD_LF box:

\x0A

CM_OCD_FF

The CM_OCD_FF command defines a formfeed.

Diconix 150 Plus: Use the Form Feed command (0x0C).

To specify the command, type the following in the CM_OCD_FF box:

\x0C

HP LaserJet IIP: Use the Form Feed command (0x0C).

To specify the command, type the following in the CM_OCD_FF box:

\x0C

CM_OCD_BS

The CM_OCD_BS command defines a backspace. This command is only required for printers that support device fonts using byte-paired CTTs. For more information about CTTs, see Character-Translation Table.

Diconix 150 Plus: Use the Backspace command (0x08) to move the cursor in the negative x-direction by the width of the current font's space character.

To specify the command, type the following in the CM_OCD_BS box:

\x08

HP LaserJet IIP: Use the Backspace command (0x08) to move the cursor in the negative x-direction by the width of the current font's space character.

To specify the command, type the following in the CM_OCD_BS box:

\x08

CM_OCD_UNI_DIR

The CM_OCD_UNI_DIR command enables unidirectional printing.

Note  The RES_BO_UNIDIR box in the fBlockOut dialog box must be checked. If this box is not checked, the Unidriver ignores these commands. The fBlockOut dialog box is contained in the RESOLUTION dialog box.

Diconix 150 Plus: Use the Unidirectional Printing On command (ESCU1).

To specify the command, type the following in the CM_OCD_UNI_DIR box:

\x1BU\x01

HP LaserJet IIP: Does not support this command. The CM_OCD_UNI_DIR box is empty.

CM_OCD_UNI_DIR_OFF

The CM_OCD_UNI_DIR_OFF command disables unidirectional printing.

Note  The RES_BO_UNIDIR box in the fBlockOut dialog box must be checked. If this box is not checked, the Unidriver ignores these commands. The fBlockOut dialog box is contained in the RESOLUTION dialog box.

Diconix 150 Plus: Use the Unidirectional Printing Off command (ESCU0).

To specify the command, type the following in the CM_OCD_UNI_DIR_OFF box:

\x1BU\x00

HP LaserJet IIP: Does not support this command. The CM_OCD_UNI_DIR_OFF box is empty.

CM_OCD_PUSH_POS

The CM_OCD_PUSH_POS command pushes the current position onto the printer's internal stack.

Diconix 150 Plus: Does not provide an internal stack for printer commands. The CM_OCD_PUSH_POS box is empty.

HP LaserJet IIP: Use the Push Cursor Position command (ESC&f0S).

To specify the command, type the following string in the CM_OCD_PUSH_POS box:

\x1B&f0S

CM_OCD_POP_POS

The CM_OCD_POP_POS command pops the current position off of the printer's internal stack.

Diconix 150 Plus: Does not provide an internal stack for printer commands. The CM_OCD_POP_POS box is empty.

HP LaserJet IIP: Use the Pop Cursor Position command (ESC&f1S).

To specify the command, type the following in the CM_OCD_POP_POS box:

\x1B&f1S

General Cursor Movement Dialog Box

(Not currently supported.)

Horizontal Movement Dialog Box

(Not currently supported.)

Vertical Movement Dialog Box

Click the fYMove button to display the fYMove from Cursor Movement dialog box.The fYMove dialog box contains controls that you use to specify the vertical cursor-movement capabilities for a printer as follows:

Control	Description
CM_YM_FAV_ABS	The Unidriver sends absolute rather than relative y-movement commands.
CM_YM_REL_UP	The printer's relative y-movement command moves the print head in both the positive and the negative y-direction.
CM_YM_NO_POR_GRX	Printer should exit portrait grx-mode before doing y-movement.
CM_YM_NO_LAN_GRX	Printer should exit landscape grx-mode before doing y-movement.
CM_YM_CR	The Unidriver sends a carriage-return command to the printer before sending any y-movement commands.
CM_YM_LINESPACING	The Unidriver uses the line spacing command for vertical movement.
CM_YM_TRUNCATE	(not supported in Windows NT)
CM_YM_RES_DEPENDENT	The Y movement command in the CURSORMOVE structure specifies movement in units of the current resolution. (Most commands are in master units, but some devices can only move in terms of the current resolution.)
Diconix 150 Plus: Check the CM_YM_CR box and the CM_YM_LINESPACING box.

HP LaserJet IIP: Check the CM_YM_FAV_ABS box and the CM_YM_NO_LAN_GRX box.


Paper Information

  Paper Information

  Paper Sizes Dialog Box

  Paper Quality Dialog Box

  Paper Sources Dialog Box

  Paper Destinations Dialog Box


Paper Sizes Dialog Box

A number of sets of paper-size commands can be set up for the minidriver. To specify paper-size commands, select Paper Info/Size... from the Printer Data menu and display the initial Paper Sizes dialog box. Alternately, you can select an existing set of paper-size commands by highlighting the desired set of sizes in the Paper Sizes list box in the minidriver's Printer Data window (scroll to display the paper sizes set on the list if necessary) and double clicking the selection to display the Paper Sizes dialog box.

The Paper Sizes dialog box specifies printer data, such as whether a particular paper size is driver-defined or predefined, the paper dimensions, the cursor origin, the unprintable-region dimensions, and so on.

The Diconix 150 Plus printer supports two paper sizes. The first is 8.5 x 11 and the second is defined by the user.

The HP LaserJet IIP printer supports the following four paper sizes and four envelope sizes:

•	8.5 x 11 inches

•	Legal (8.5 x 14 inches)

•	Executive (7.25 x 10.5 inches)

•	A4 (210 x 297 millimeters)

•	Envelope #10 (4 1/8 x 9 1/2 inches)

•	Envelope DL (110 x 220 millimeters)

•	Envelope C5 (162 x 229 millimeters)

•	Envelope C3 (324 x 458 inches)

Note  The examples in the following topics are based on the first paper size initialized for each minidriver. In both instances, this is the standard letter size (8.5 x 11) paper.

When you finish entering data in the Paper Sizes dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Predefined (Paper Sizes)

The Predefined button, when set, allows selection of a single paper size from the Name listbox of predefined names supplied by the Unidriver or minidriver. Click the adjacent Name list box and select a single paper size. This information will be presented to the user.

Diconix 150 Plus: Select the name: Letter 8.5 x 11 in.

HP LaserJet IIP: Same as Diconix 150 Plus.

Driver Defined (Paper Sizes)

The Driver Defined button identifies a driver defined paper size. If the Driver Defined button is set, enter the name of the paper size in the adjacent Name box. This information will be presented to the user.

Diconix 150 Plus: The paper size is predefined. This button is not selected.

HP LaserJet IIP: Same as Diconix 150 Plus.

X Size (Paper Width)

The X Size control specifies the page width. If the paper size is Predefined, UniTool provides this value. If the paper size is defined by the user, specify this value in master units.

Diconix 150 Plus: The X Size box contains 8160 (8.5 inches x 960 dots per inch).

HP LaserJet IIP: The X Size box contains 2550 (8.5 inches x 300 dots per inch).

Y Size (Paper Height)

The Y Size box control specifies the page height. If the paper size is Predefined, UniTool provides this value. If the paper size is defined by the user, specify this value in master units.

Diconix 150 Plus: The Y Size box contains 6336 (11 inches x  576 dots per inch).

HP LaserJet IIP: The Y Size box contains 3300 (11 inches x 300 dots per inch).

Portrait Mode and Landscape Mode

The Paper Sizes dialog box contains separate group boxes for configuring the printer for portrait and landscape modes. Both group boxes contain a Select box, an Unprintable Regions box, a Cursor Origin box, and Vector Offset box. The following topics describe the boxes in more detail.

Select Paper Size

The Select String box command selects the paper size identified in Name. Laser printers usually require a device command to select a page size.. For nonlaser printers, use a device command to set the page size if the command is available. In either case, if a page size selection command is used, check the PS_EJECTFF box in the fGeneral dialog box.

Diconix 150 Plus: The default paper size is 8.5 x 11 inches. No command is required.

HP LaserJet IIP: These printer-specific commands prevent problems on particular printers as follows:

•	Page Size command (ESC&l2A) selects the 8.5 x 11 inch paper size.

•	Line Spacing command (ESC&l4D) selects a vertical line spacing of four lines per inch.

•	Top Margin command (ESC&l1E) specifies that the top margin is the height of one line.

•	Text Length command (ESC&l42F) specifies that 42 lines per page.

To specify a combination of these commands, type the following in the Select String box:

\x1B&l2a4d1e42F

Unprintable-Region Dimensions

Many printers cannot print text and graphics on some portion of the page. This area of the page is referred to as the unprintable region. For example, most laser printers have an unprintable region that varies with different page sizes. Many narrow carriage dot matrix printers can only print eight inches of text or graphics. Additionally, the use of sheet feeders on many nonlaser printers can introduce an unprintable region on the top and/or bottom of the page.

To obtain correct output for the different combinations of printer models, paper sizes, and paper sources, the minidriver must specify information about the size and placement of the unprintable regions of a printer.

For more information about limitations imposed by a specific printer model, see Model Data.

For more information about limitations imposed by a paper-feed method, see Paper Sources Dialog Box.

The Unprintable Regions control specifies the size of the unprintable regions at the top, bottom, left, and right side of a particular paper size. The unprintable region for a paper size is that region where output is clipped as a result of physical limitations imposed by the printer's hardware.

To generally determine the location of the printer's physical boundaries:

1.	Create an ASCII text file using a line width that exceeds the paper width and a page length that exceeds the paper height.

2.	Copy the file to the printer.

3.	Measure the distance from the left edge of the paper to the left edge of the text.

4.	Measure the distance from the right edge of the paper to the right edge of the text.

5.	Measure the distance from the top of the paper to the first line of text.

6.	Measure the distance from the bottom of the paper to the last line of text.

To determine the unprintable region:

1.	Convert the four values obtained above into master units.

2.	Enter these values in the unprintable-region controls.

After your minidriver is installed, test the accuracy of the values that you entered in the Unprintable Regions boxes. To do this, use PRNTTEST.EXE, which is included in the Printer Compatibility Test Suite, and run the printable region test. The other method requires a Windows graphics or desktop publishing package as follows:

1.	Open a Windows graphics or desktop publishing application that renders straight lines around the entire length and width of the page.

2.	Render four lines: two horizontal lines and two vertical lines as follows:

•	Top horizontal line one inch below the top of the page

•	Bottom horizontal line one inch above the bottom of the page

•	Left vertical line one inch from the left edge of the page

•	Right vertical line one inch from the right edge of the page

3.	Print the page.

4.	Examine the intersections of the vertical and horizontal lines.

The lines in the upper-left corner must intersect one inch below the top of the page and one inch from the left edge of the page. If not, adjust the cursor origin. For example, if the horizontal line at the top of the page is 1.125 inches from the top, and the horizontal line at the bottom of the page is .875 inches from the bottom, increment the Y cursor origin by .125 inches.

Note  If the cursor origin is set in the Paper Sizes dialog box, check the MD_USE_CURSOR_ORIG box in the fGeneral dialog box of the ModelData dialog box.)

Diconix 150 Plus: The hardware limits the printable page width to 6.875 inches. Set the left, right, top, and bottom unprintable regions to 0. The size of the unprintable top and bottom margins can vary depending on the paper source. The sizes of the unprintable top and bottom regions are expressed in the paper-source data structure.

Because this limit is imposed by the printer model, not by the paper size, list the Page Size Limit (width) in the ModelData data structure and not in the PAPERSIZE data structure. (This same limit applies to any paper size and is not specific to letter-sized paper.)

HP LaserJet IIP: The hardware limits the printable-page width to 8.047 inches. This means that the left and right unprintable regions on this printer measure ((8.5 − 8.047)/2) inches or .2267 inches. Converted to horizontal-master units, this value is expressed as (.21875 * 300) or 68. Enter 68 in the Left and Right boxes of the Unprintable Regions control.

The printer hardware also limits the printable page height to 10.995 inches. This means that the top and bottom unprintable regions on this printer measure ((11 − 10.5)/2) inches or .25 inches. Converted to vertical master units, this value is expressed as (.25 * 300) or 75. Enter 75 in the Top and Bottom boxes of the Unprintable Regions control.

Cursor Origin

(Not currently supported; values should be set to zero.)

Vector Offset

(Not currently supported; values should be set to zero.)

Page Protection

The Page Protection commands enable or disable page protection. The KB Required box specifies the amount of memory, in kilobytes, to allocate for page protection when protection is enabled.

Diconix 150 Plus: Does not support page protection. The Enable and Disable boxes are empty, and the KB Required box contains zero.

HP LaserJet IIP: Same as Diconix 150 Plus.

wYSizeUnit

(Not supported by Windows NT.)

General Paper-Sizes Dialog Box

Click the fGeneral button to display the fGeneral dialog box. The fGeneral dialog box contains the following check boxes:

Control	Description
PS_CENTER	The Unidriver centers the printable region on the page.
PS_ROTATE	The Unidriver swaps the x- and y- paper-size dimensions. If this control is set, Unidriver does not swap the margin widths.
PS_EJECTFF	The Unidriver can eject a page of this paper size using the form-feed command instead of y-movement commands.
Diconix 150 Plus: None of the boxes are checked.

HP LaserJet IIP: Same as Diconix 150 Plus.

Paper Type Dialog Box

Click the fPaperType button to display the fPaperType dialog box. The fPaperType dialog box matches paper sizes (legal, letter, and so on) to paper sources (trays, bins, or other paper-feed mechanisms).

Note  The corresponding bit must be set in both the PAPERSIZE and PAPERSOURCE data structures for the combination to be valid. The name assigned to each bit is provided for convenience.

The controls in this dialog box specify the paper size that corresponds to the paper source as follows:

Control	Description
PS_T_STD	Standard paper
PS_T_LARGE	Large paper
PS_T_ENV	Envelope
PS_T_LRGENV	Large envelope
PS_T_ROLL	Paper roll
Diconix 150 Plus: Check the PS_T_STD for the 8.5 by 11-inch paper size. This control is also selected for the tractor-feed and sheet-feed paper sources in the Paper Sources dialog box.

HP LaserJet IIP: Check the PS_T_STD is selected for the 8.5 by 11-inch paper size. This control is also selected for the upper paper tray, lower paper tray, and manual feed paper sources in the Paper Sources dialog box.


Paper Quality Dialog Box

(Not currently supported.)


Paper Sources Dialog Box

A number of sets of paper-source commands can be set up for the minidriver. To specify the paper source commands, select Paper Info/Source... from the Printer Data menu on the minidriver's Printer Data window to access the initial Paper Sources dialog box. Alternately, you can select an existing set of paper source commands by highlighting the desired set of Paper Sources entries to edit on the minidriver's Printer Data window. Then double click on the selection to display the Paper Sources dialog box.

The Paper Sources dialog box is provided as a means to specify paper sources.

The Diconix 150 Plus printer supports two paper sources as follows:

Constant	Description
DMBIN_TRACTOR	Specifies tractor-feed capabilities.
DMBIN_MANUAL	Specifies manual-feed capabilities.
The HP LaserJet IIP printer supports one of the following paper sources:

Constant	Description
DMBIN_UPPER/ONLY	Specifies upper-paper tray capabilities.
DMBIN_ENVMANUAL	Specifies manual envelope-feed capabilities.
DMBIN_MANUAL	Specifies manual-feed capabilities.
DMBIN_LOWER	Specifies lower-paper tray capabilities.
The examples contained in the following topics are based on the first paper source that was initialized for each minidriver. For the Diconix printer, the first paper source specifies tractor feed. For the HP LaserJet IIP, the first paper source specifies the upper paper tray.

When you finish entering data in the Paper Sources dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Predefined/Driver-Defined Paper Sources

The Predefined and Driver Defined options specify whether the data and commands in the Paper Sources dialog box correspond to predefined or driver-defined paper qualities. These options also specify whether the single paper source description presented to the user is selected from the predefined names supplied by the Unidriver or by the minidriver.

Diconix 150 Plus: Set the Predefined button

HP LaserJet IIP: Same as Diconix 150 Plus.

Predefined Paper Source

If the Predefined button is set, click the adjacent Source Name dropdown list box and select the name of a single paper source as follows:

Paper Source	Description
DMBIN_UPPER/ONLY	Upper paper tray
DMBIN_LOWER	Lower paper tray
DMBIN_MIDDLE	Middle paper tray
DMBIN_MANUAL	Manual feed
DMBIN_ENVELOPE	Envelope feed
DMBIN_ENVMANUAL	Manual envelope feed
DMBIN_AUTO	Automatic sheet feeder
DMBIN_TRACTOR	Tractor feed
DMBIN_SMALLFMT	Small format paper
DMBIN_LARGEFMT	Large format paper
DMBIN_LARGECAPACITY	Large capacity paper tray
DMBIN_CASSETTE	Paper cassette
DMBIN_ROLL	Paper roll
DMBIN_USER	User-defined paper source
Diconix 150 Plus: Select DMBIN_TRACTOR. The primary paper source is the tractor-feed mechanism.

HP LaserJet IIP: Select DMBIN_UPPER/ONLY. The primary paper source is the upper-paper tray.

Note  When DMBIN_UPPER/ONLY is selected, click the fPaperType button to display the Paper Types dialog box and check the appropriate box for the paper size.

Driver-Defined Paper Source

The Driver Defined Source Name textbox is provided for a printer that uses a driver-defined paper source not identified in the list of predefined selections. If the Driver Defined button is set, enter the adjacent Source Name to describe the name of the paper source.

Diconix 150 Plus: The paper source is predefined. This box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

Paper Source Select String

The Select String command selects the paper source identified in the Paper Sources dialog box.

Diconix 150 Plus: The default paper source uses the tractor-feed mechanism and does not require selection.

HP LaserJet IIP: Use the Paper Source command (ESC&l1H) to designates that the upper-paper tray is the paper source.

To specify the command, type the following in the Select String box:

\x1B&l1H

Unprintable Regions

The Unprintable Regions control specifies the height of the unprintable regions at the top and bottom of a page of paper. These values specify the amount of space that becomes unprintable due to the paper-feed mechanism. Typically, sheet feeders are the only type of paper source that introduces an unprintable region. (These values are not the same values entered in the Paper Sizes dialog box.)

Diconix 150 Plus: Use -1 for the Top and Bottom boxes. The paper feed mechanism does not create a unique unprintable region.

HP LaserJet IIP: Same as Diconix 150 Plus.

Bin Adjustment

(Not currently supported)

General Paper-Source Dialog Box

Click the fGeneral button to display the fGeneral from Paper Sources dialog box. The controls in this dialog box specify general information relating to the paper-source selection as follows:

Control	Description
PSRC_EJECTFF	Check the box if the printer ejects a page of paper by sending a form-feed command. The check box is not selected if the printer ejects the page by sending y-movement commands.
PRSC_MAN_PROMPT	Check the box if the user is to be prompted to insert a new piece of paper before printing each page.
Diconix 150 Plus: Check the PSRC_EJECTFF box.

HP LaserJet IIP: Same as Diconix 150 Plus.

Paper Types Dialog Box

Click the fPaperTypes button to display the fPaperTypes from Paper Sources dialog box. This dialog box matches sizes paper sizes (legal, letter, and so on) to paper sources (trays, bins, or other paper feed mechanisms).

The corresponding bit must be set in both the PAPERSOURCE data structure and the PAPERSIZE data structure for the combination to be valid. The name assigned to each bit is provided for convenience.

The four controls in this dialog box specify the paper size according to the paper source as follows:

Control	Description
PS_T_STD	Standard paper
PS_T_LARGE	Large paper
PS_T_ENV	Envelope
PS_T_LRGENV	Large envelope
PS_T_ROLL	Paper roll
Diconix 150 Plus: Check the PS_T_STD box for the 8.5 by 11 inch paper size. (This control is also selected for the tractor feed and sheet feed paper sources in the Paper Sources dialog box.)

HP LaserJet IIP: Same as Diconix 150 Plus.


Paper Destinations Dialog Box

(Not currently supported)


Graphics Information

  Graphics Information

  Resolution Dialog Box

  Compression Dialog Box

  Color Models Dialog Box

  Rectangle Fill Dialog Box

  Image Control Dialog Box

  Print Density Dialog Box


Resolution Dialog Box

A number of sets of graphics resolution commands can be set up for the minidriver. To specify graphics resolution commands, select Graphics Info from the Printer Data menu on the minidriver's Printer Data window. Then select Resolution to display the initial RESOLUTION dialog box.

The RESOLUTION dialog box specifies resolution data such as the text resolution, graphics resolution, color capabilities at a given resolution, methods of sending blocks of graphics data, and so on.

Printers support one or more horizontal and vertical resolutions for raster graphics output. A resolution is an integer value specified in dots-per-inch (dpi), which indicates the number of distinct dots that the print head or inkjet can apply along the x- or the y-axis.

In some instances, the sample Diconix 150 Plus and Hewlett-Packard LaserJet IIP minidrivers support multiple sets of commands and data. For example, both minidrivers contain three RESOLUTION dialog boxes. In this topic, the examples use the first dialog box, which supports the highest graphics resolution.

The Diconix 150 Plus supports the following x-y resolutions:

•	80 x 96

•	160 x 96

•	320 x 96

The HP LaserJet IIP supports the following x-y resolutions:

•	75 x 75

•	150 x 150

•	300 x 300

When you finish entering data in the RESOLUTION dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Display Format

The Display Format box contains the conversion specification for the resolution string. The most common conversion specification is %d x %d; such as for 320 x 96. In cases where two parameters are supplied in the display format string, the x-resolution is enumerated first.

Diconix 150 Plus: The Display Format box contains:

%d x %d

HP LaserJet IIP: The Display Format box contains:

%d dots per inch

Scale Factors

The Scale Factors specify horizontal and vertical scale factors for raster graphics and text output using device fonts. Unlike other values specified in the minidriver, the scale factors are expressed in dpi rather than master units. The values specified must factor evenly into master units.

Text scale factors indicate the resolution for digitizing device fonts. Graphic scale factors describe the resolution required to place individual pixels on the page. Because graphic scale factors are tracked internally as logarithmic ratios to text scale factors, graphic scale factors must either be equal to the text scale factors or equal to a text scale factor divided by a power of 2. For example, a text scale factor of 300 dots per inch can use a graphic scale factor of 300, 150 (300/2), of 75 (300/4), but not a graphic scale factor of 100.

For most laser printers, text and graphics are sent to the printer in separate bands. The scale factors determine the coordinates where each object is placed in a given band on the page. For example, the HP LaserJet IIP supports one of several resolutions with an x and y text scale factor of 300 dpi, and a graphics scale factor of 75 dpi. When using this resolution, text is printed using device fonts that are output at 300 dpi accuracy and raster graphic objects output at 75 dpi accuracy.

For most dot-matrix and inkjet printers, text and graphics are sent to the printer in the same band. The graphic scale factors determine the coordinates for the placement in a given band. For these printers, the text and graphic scale factors are the same. Attempting to set different scale factors does not change output quality and causes Windows to not enumerate TrueType fonts when this resolution is selected.

Note  TrueType fonts are not available for those resolutions where the text scale factor does not equal the graphic scale factor unless the driver supports TrueType font downloading. For more information, see Download Information Dialog Box.

Diconix 150 Plus: The text and graphics resolutions are identical. Use 320 for the X DPI boxes and 96 for the Y DPI boxes.

HP LaserJet IIP: The device fonts are digitized at the highest printer resolution (300 dpi). At the highest graphics resolution, use 300 for each Scale Factors box.

Graphics Cursor Dialog Box

Click the fCursor button to display the fCursor dialog box. The fCursor dialog box controls describe how the printer positions the cursor after rendering a block of raster data. (A block of raster data is a row of bits in a bitmap produced by one pass of the print head.) Use any of the following controls as needed:

Control	Description
RES_CUR_X_POS_ORG	Aligns the cursor with the left edge of the original block of raster data after printing a block of data.
RES_CUR_X_POS_AT_0	Aligning the cursor with the left edge of the printable region (page).
RES_CUR_Y_POS_AUTO	Moves the cursor in the positive y-direction to the start of the next row of data after printing a lock of data.
RES_CUR_CR_GRX_ORG	Resets the left-edge coordinates of a block of graphics data when internal blanks are removed (for HPPCL printers only).
If your printer uses the Hewlett-Packard Printer Control Language (PCL), and you have checked the RES_BO_ENCLOSED_BLNKS box in the fBlockOut dialog box, you should also check the RES_CUR_CR_GRX_ORG box in the fCursor dialog box. (This is because PCL printers redefine the left edge of a block of graphics data when internal blanks are removed. By setting the RES_CUR_CR_GRX_ORG box, you set a flag that informs the Unidriver that it must reset the left-edge coordinates.)

Diconix 150 Plus: None of the boxes are checked.

HP LaserJet IIP: Check the RES_CUR_X_POS_ORG box , the RES_CUR_Y_POS_AUTO box, and the RES_CUR_GRX_ORG box.

Graphics Dump Data Dialog Box

(Not currently supported.)

Graphics Block Data Dialog Box

Click the fBlockOut button to display the fBlockOut dialog box. the fBlockOut dialog box controls specify how the Unidriver formats each block of raster-graphic (bitmap) data to be sent to the printer. A block is defined as having a height of n scan lines where n is equal to the sNPins control. For more information, see "Number of Pins" below.

The controls in the BlockOut dialog box specify if the Unidriver is to perform the following:

Control	Description
RES_BO_LEADING_BLNKS	Strip leading, non-printing graphic data from the beginning of each block of raster data (bitmap) sent to the printer.
RES_BO_TRAILING_BLNKS	Strip trailing, nonprinting graphic data from the end of each block of raster data (bitmap) sent to the printer.
RES_BO_ENCLOSED_BLNKS	Strip enclosed, nonprinting graphic data from within each block of raster data (bitmap) sent to the printer, if the number of bytes of nonprinting raster data exceeds that value listed in the sMinBlankSkip control in the RESOLUTION dialog box.
RES_BO_RESET_FONT	Selected device font needs to be reset after printing grx.
RES_BO_UNIDIR	Enable unidirectional printing using the data in the Cursor Movement dialog box with this resolution. Some printers require this setting for correct horizontal alignment of output.
RES_BO_NO_ADJACENT	Inidcate that vertically adjacent pins on the print head are not fired simultaneously.
RES_BO_OEMGRXFILTER	Minidriver provides a callback function to alter raster graphic data.
RES_BO_MULTIPLE_ROWS	Send multiple scanlines of data with each RES_OCD_SENDBLOCK command; otherwise, the minidriver sends only one at a time. This option affects only laser printers for which sPinsPerPass is set to 1.
Note  The term strip raster graphics data means that Unidriver substitutes available cursor-movement commands in place of nonprinting raster graphic data prior to sending the data to the printer. This usually results in a performance gain because cursor-movement commands typically require less data when sent to the printer. Most printers benefit from using the RES_BO_TRAILING_BLNKS bit. Due to differences in the resolutions of cursor-movement commands and graphics resolutions, use care with the RES_BO_LEADING_BLNKS and RES_BO_ENCLOSED_BLNKS bits to ensure that horizontal misalignment of graphic output does not occur.

Diconix 150 Plus: Check the RES_BO_TRAILING_BLNKS box. The RES_BO_LEADING_BLNKS and RES_BO_ENCLOSED_BLNKS boxes are not checked because the available methods of moving the cursor do provide a reasonable degree of accuracy.

HP LaserJet IIP: Check the RES_BO_ENCLOSED_BLNKS box and the RES_BO_TRAILING_BLNKS box. The RES_BO_LEADING_BLNKS box is not checked. (The performance of HPPCL minidrivers is significantly reduced when this box is checked and the Unidriver removes leading blanks from a bitmap.)

Number of Pins

The sNPins box in the RESOLUTION dialog box specifies the minimum height (in pixels) of lines of raster data that the Unidriver evaluates at one time. This is typically the number of pins or jets used by the printer for each horizontal slice of graphic output produced by one pass of the print head.

Note  When the value of sNPins is equal to the value of sPinsPerPass, this is referred to as noninterlaced graphics output.

Diconix 150 Plus: Use 8 for the sNPins box. This is the number of jets used by the printer for noninterlaced graphics. Use 16 for interlaced graphics.

HP LaserJet IIP: Use 1 for the sNPins box.

Interlaced Graphics

In some cases, a higher resolution than the one native to the printer can be created by vertically interlacing graphics (rendering each block of graphics data in two passes) using the sPinsPerPass. The sPinsPerPass control is a vertical cursor-movement command that uses a resolution at least twice as fine as the native vertical-graphics resolution. The Unidriver accomplishes this by sending the first block of raster data as normal. During the second pass, the printhead position is incremented in the y-direction by a value that is less than or equal to the height of a single pin or jet. To render bitmaps correctly using interlaced graphics, the Unidriver requires the number of pins to be fired by the printer as defined in the sNPins box. If the height of a block of graphics data is less than the height of the specified pins, the Unidriver adds null graphics data to the block.

For example, many 9-pin dot-matrix drivers typically support a 240 x 72 dpi resolution as their highest native mode. These printers also have a vertical-movement command that operates in 1/144 inch. The Unidriver can support 240 x 144 dpi resolutions if the driver sets sPinsPerPass to 8 (the number of pins fired in one pass), sets sNPins to 16 (the number of pins fired in two passes), and supports the 1/144-inch vertical command.

Diconix 150 Plus: Use 8 for the sPinsPerPass box. This is the number of jets used by the printer for noninterlaced graphics.

HP LaserJet IIP: Use 1 for the sPinsPerPass box.

Vertical Text Offset

The sTextYOffset box specifies the difference between the baseline of printer fonts and the baseline of GDI fonts. If the baseline of device fonts differs from the baseline of GDI fonts and an application mixes the two fonts on a line, the text appears uneven. To prevent this, the Unidriver specifies the difference between the two baselines in master units.

Diconix 150 Plus: Use 0 for the sTextYOffset box . The baseline of printer fonts is identical to the baseline of GDI fonts.

HP LaserJet IIP: Same as Diconix 150 Plus.

Minimum Number of Blanks

The sMinBlankSkip box specifies the minimum number of bytes of null data (blanks) that must occur before the Unidriver begins removing embedded blanks from the block of bitmap data. If the Unidriver removes most of the null raster data sent to the printer to reduce data transmission, printing and performance time can increase. For example, if this value is too small due to printhead movement when switching from graphics mode to cursor movement commands. Dot-matrix minidrivers are recommended to use values no smaller than the number of bytes of raster data required for two inches of output.

Diconix 150 Plus: Use 0 for the sMinBlankSip box.

HP LaserJet IIP: Use 32 for the sMinBlankSkip box . In this case, the Unidriver strips blank data from a bitmap unless there are at least 32 consecutive NULL bytes.

Spot Diameter

The sSpotDiameter box specifies a special value the Unidriver uses to rasterize graphic data and compensate for overlapping pixels. The value entered affects the lightness or darkness of printed raster-graphic images. The spot diameters for common resolutions supported by 9-pin, 24-pin, and ink-jet printers are as follows:

Printer	Resolution	Diameter
9-pin	240 x 144	170
	120 x 144	140
	120 x 100	100
24-pin	360 x 180	170
	180 x 180	140
	120 x 180	120
Ink-Jet	360 x 360	100
	180 x 180	100
	120 x 180	100
Diconix 150 Plus: Use 100 for the sSpotDiameter box.

HP LaserJet IIP: Same as Diconix 150 Plus.

Default Dither Brush

The Default Dither Brush box specifies the default dithering technique for the selected resolution. Select the technique that looks the best for the given printer model and resolution. These choices are available:

Technique	Description
None	No dithering.
Coarse	The dither pattern is clustered.
Fine	The dither pattern is evenly dispersed.
LineArt	The dither pattern is optimized for color graphics images with sharp separation. This technique is not recommended as the default, and it is not supported for color graphics.
Diconix 150 Plus: The Coarse button is selected.

HP LaserJet IIP: The Fine button is selected.

Select Resolution

The Select Resolution command selects the designated printer resolution.

Diconix 150 Plus: Integrates the selection of the resolution with the Send Block command. This box is empty.

HP LaserJet IIP: Use the Raster Graphics Resolution command (ESC*tnR) to select the resolution for graphics output where n specifies a resolution of 75, 100, 150, or 300 dpi.

To specify the command for 300 dpi graphics, type the following in the Select Resolution box:

\x1B*t300R

Begin Graphics

The Begin Graphics command is sent to the printer to enable graphics output. (Printers that provide a specific command to select a graphics resolution can also provide a command to enter graphics mode.)

Diconix 150 Plus: Automatically begins rendering graphics when a Send Block command is received. The Begin Graphics box is empty.

HP LaserJet IIP: Use the Start Raster Graphics command (ESC*rnA) to signal the start of raster graphics and specify the location of the left margin. If n is 1, the current cursor location defines the left margin for the graphics output; if n is 0, the left edge of the page defines the left margin for the graphics output.

To specify the command using the current cursor location as the left margin, type the following in the Begin Graphics box:

\x1B*r1A

End Graphics

The End Graphics command is sent to the printer to disable graphics output. (Printers that provide a specific command to disable a graphics resolution can also provide a command to end the processing of graphics data.)

Diconix 150 Plus: Automatically ends graphics output after processing the last byte of graphics data. This control is not initialized.

HP LaserJet IIP: Use the End Raster Graphics command (ESC*rB) to disable raster graphics output.

To specify the command, type the following in the End Graphics box:

\x1B*rB

End Block

The End Block command terminates or ends the processing of a block of graphics data.

Diconix 150 Plus: Stops processing graphics data at the conclusion of the command specified in the Send Block box. The End Block box is empty.

HP LaserJet IIP: Processes a single block (or row) of data at a time. A command to terminate the processing of graphics data is not required. The End Block box is empty.

Send Block

The Send Block command processes or sends one or more blocks (or rows) of graphics data.

Diconix 150 Plus: Use the Quadruple-Density 8-Bit Graphics command (ESCZn1n2d1...dn) to process multiple blocks (that is, an entire bitmap) at the 320 x 96 dpi resolution. The arguments n1 and n2 specify the total number of bytes of graphics data: n1 is the remainder when this number is divided by 256, and n2 is the quotient. The arguments d1 thru dn represent the actual bytes of graphics data.

To specify the command, type the following in the Send Block box:

\x1BZ%l

HP LaserJet IIP: Use the Transfer Raster Data command (ESC*bnW) to process a single block of raster data at the specified resolution. The argument n specifies the count of bytes of raster data.

To specify the command, type the following in the Send Block box:

\x1B%dW


Compression Dialog Box

A number of sets of graphics compression commands can be set up for the minidriver. To specify graphics compression commands, select Graphics Info from the Printer Data menu on the minidriver's Printer Data window. Then select Compression to display the initial Compression dialog box.

To select an existing set of graphics compression commands, highlight the desired set of Compression commands to edit on the minidriver's Printer Data window. Then, double click on the selection to display the Compression Modes dialog box.

Some printers can receive raster graphic data in a compressed format that typically results in increased performance. The increased performance is due to the reduced amount of data sent to the printer to print bitmaps. If your printer supports compression of graphics data (bitmaps) using run-length encoding (RLE), or Tag Information File Format (TIFF) version 4.0, use the Compression Modes dialog box.

The Diconix 150 Plus printer does not support data compression. The HP LaserJet IIP printer supports both run-length encoding and TIFF. The HP LaserJet examples are based on the dialog box that contains commands for TIFF encoding.

When you finish entering data in the Compression dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Compression Type

Click the Compression Type box and select the type of compressionas follows:

•	Run Length Encoding

•	Tiff Encoding (4.0)

(Delta Row compressions is not currently supported)

Diconix 150 Plus: Does not support compression. The Compression Type box is empty.

HP LaserJet IIP: Supports RLE as specified in the Compression Type box.

Begin Compression

The command in the Begin textbox enables the compression of graphics data.

Diconix 150 Plus: The Begin box is empty.

HP LaserJet IIP: Use the Set Compression Mode command (ESC*bnM) to enable and disable the various types of graphics compression. If n is 0, graphics compression is disabled; if n is 1, run-length encoding is enabled; if n is 2, TIFF encoding is enabled; and if n is 3, delta-row compression is enabled.

To specify the command to enable run-length encoding, type the following in the Begin box:

\x1B*b1M

End Compression

The command in the End listbox disables the compression of graphics data.

Diconix 150 Plus: The End box is empty.

HP LaserJet IIP: Use the Set Compression Mode command (ESC*bnM) to enable and disable various types of graphics compression. If n is 0, graphics compression is disabled; if n is 1, run-length encoding is enabled; if n is 2, TIFF encoding is enabled; and if n is 3, delta-row compression is enabled.

To specify the command to disable TIFF encoding, type the following in the Begin box:

\x1B*b0M


Color Models Dialog Box

A number of sets of color commands can be set up for the minidriver. To specify color commands, select Graphics Info from the Printer Data menu on the minidriver's Printer Data window. Then select Color to display the initial Color Models dialog box.

To select an existing set of color commands, highlight the desired set of Color Models commands to edit on the minidriver's Printer Data window. Then, double click on the selection to display the Color Models dialog box.

Most printers support one of two color methods: planar or pixel. Devices that use the pixel method send all of the RGB data for a single pixel at once, typically using at least two bytes per single pixel. The Unidriver does not support color on printers that require color-raster graphic data using the pixel method.

Printers that use the planar method send the color data for a single pixel in several passes (planes). The value that results from combining the data for one pixel in each plane determines the color that pixel assumes. Devices that use the planar method typically use three or four color planes. A three-plane model represents cyan data in one plane, yellow data in a second plane, and magenta data in a third plane. By combining inks from these three basic colors (cyan, yellow, and magenta), the device can render images of up to eight colors. A four-plane model is identical to the three-plane model except for the addition of a fourth plane that represents black data. (In the three-plane model, cyan, yellow, and magenta ink is combined in equal parts to create black output.)

Until recently, most color printers used planar models to represent color images. For this reason, the current version of the DMCOLOR library and the UniTool application support this model (rather than the pixel model). You can provide a callback function to convert planar color data into pixel color data. In some instances, the converted data does not take advantage of a printer's color-output capabilities. For example, DMCOLOR allows a maximum of eight colors (cyan, blue, magenta, red, yellow, green, white, and black). This means that DMCOLOR converts any 256-color pixel image into an 8-color planar image. If a printer supports 256 colors, it can not display the original image, even if the minidriver provides the callback function. Obviously, some printers are better supported by the original Windows driver interface.

The Color Models dialog box controls specify the color capabilities of printers that render color output. For example, these controls specify values such as the number of color planes supported by printers that use a color-plane format, the number of bits per pixel supported by printers that use a bit-per-pixel format, the device commands that select colors, and so on.

Note  Because neither the Diconix 150 Plus nor the HP LaserJet IIP printers provide color support, this section contains information for an additional printer, the Hewlett-Packard PaintJet.

When you finish entering data in the Color Models dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Number of Color Planes

The sPlanes box specifies the number of color planes supported by the printer.

HP PaintJet: Use 3 for the sPlanes box.

Number of Bits per Pixel

The sBitsPixel box specifies the number of bits of data required for each color pixel.

HP PaintJet: Use 1 for the sBitsPixel box. One bit in each plane corresponds to a single pixel.

General Color Data Dialog Box

Click the fGeneral button to display the fGeneral dialog box. This dialog box contains boxes that specify general color capabilities for a printer as follows:

Control	Description
DC_PRIMARY_RGB	If this bit is set, sPlanes must equal three with the Unidriver. The Unidriver first sends data for the red plane, followed by the blue and green planes. The printer  then converts this data into an index into its color palette to obtain the eight basic colors. If this bit is not set, the Unidriver sends black data first (only if the DC_EXTRACT_BLACK bit is set, followed by data for the cyan, magenta and yellow planes.)
DC_EXTRACT_BLK	If this bit is set, sPlanes must equal four. This control specifies that the printer renders black using a separate ink or ribbon. If this control is not set, the Unidriver assumes that the printer renders black by mixing the other colors.
DC_SEND_CR	The Unidriver sends a carriage return to clear the output buffer before processing the next plane of color-raster data.
DC_SEND_ALL_PLANES	The Unidriver sends all color plane data to the printer; otherwise, the driver may send only non-null data. This flag applies only to color-plane devices.
DC_SEND_PAGE_FRAME	The Unidriver sends color plane data one page at a time. This flag applies only to color-plane devices.
DC_EXPLICIT_COLOR	The Unidriver sends a command to select a given color; the selection is not implied by the RES_OCD_SENDBLOCK command. This flag applies only to color-plane devices.
DC_SEND_PALETTE	The Unidriver downloads the color palette. This flag applies only to color plane devices.
HP PaintJet: Check the DC_PRIMARY_RGB box because the printer uses the RGB color model.

Color-Planes Selection

The Color Planes control specifies the commands that render the color graphics output. Select a plane from the Plane # box, enter the command for rendering that plane in the Command box, and select an identifier for the plane from the Plane ID box.

HP PaintJet: The Command box for planes 1 and 2 contain the Transfer Raster Data by Plane command (ESC*bnV) where n specifies the number of bytes of raster data.

To specify the command, type the following in the Command box for planes 1 and 2:

\x1B*b%dV

The Command box for the plane 3 contains the Transfer Raster Data by Row command (ESC*bnW). This command differs from the previous command in that it moves the current active position (CAP) to the next row of data.

To specify the command, type the following in the Command box for plane 3:

\x1B*b%dW

Because the PaintJet printer uses three-plane technology, the Command box for plane 4 is empty.

Color Plane Identifier

The Plane ID box indicates the order in which the color plane data is sent to the printer.

HP PaintJet: Contains DC_PLANE_RED for plane 1, DC_PLANE_BLUE for plane 2 blue, and DC_PLANE_GREEN for plane 3.

Note  If the DC_PRIMARY_RGB bit is set in the fGeneral dialog box, the Unidriver uses the device commands to send a color plane of graphics data instead of sending block commands from the resolution section when color is enabled.

DC_OCD_TC_XXX Text-Color Commands

The Commands controls specify commands that render the color text output. The Commands controls includes the following:

Command	Description
DC_OCD_TC_BLACK	Sets the text color to black.
DC_OCD_TC_RED	Sets the text color to red.
DC_OCD_TC_GREEN	Sets the text color to green.
DC_OCD_TC_YELLOW	Sets the text color to yellow.
DC_OCD_TC_BLUE	Sets the text color to blue.
DC_OCD_TC_MAGENTA	Sets the text color to magenta.
DC_OCD_TC_CYAN	Sets the text color to cyan.
DC_OCD_TC_WHITE	Sets the text color to white.
DC_OCD_SETCOLORMODE	Select the printer model. This command is required only for pixel color models.
HP PaintJet: The DC_OCD_TC_BLACK, DC_OCD_TC_RED, DC_OCD_TC_GREEN, and DC_OCD_TC_YELLOW boxes contain the corresponding Text Color command (ESC&vnS) that renders text using the specified color. If n is 0, the text color is black; if n is 1, the text color is red; if n is 2, the text color is green; if n is 3, the text color is yellow, and so on.

To select black text, type the following command in the DC_OCD_TC_BLACK box:

\x1B&v0S

To select red text, type the following command in the DC_OCD_TC_RED box:

\x1B&v1S

To select green text, type the following command in the DC_OCD_TC_GREEEN box:

\x1B&v2S

To select yellow text, type the following command in the DC_OCD_TC_YELLOW box:

\x1B&v3S

To select blue text, type the following command in the DC_OCD_TC_BLUE box:

\x1B&v4S

To select magenta text, type the following command in the DC_OCD_TC_MAGENTA box:

\x1B&v5S

To select cyan text, type the following command in the DC_OCD_TC_CYAN box:

\x1B&v6S

To select white text, type the following command in the DC_OCD_TC_WHITE box:

\x1B&v7S

DC_OCD_SETCOLORMODE

The DC_OCD_SETCOLORMODE command initializes a printer to process color data.

HP PaintJet: Use the Set Number of Planes Per Row command (ESC*rnU) to initialize the printer for color data processing. The argument n specifies the number of planes of color data.

To specify the command, type the following in the DC_OCD_SETCOLORMODE box:

\x1B*r3U


Rectangle Fill Dialog Box

A number of sets of rectangle-fill commands can be set up for the minidriver. To specify rectangle-fill commands, select Graphics Info from the Printer Data menu on the minidriver's Printer Data window. Then select RectFill to display the initial Rectangle Fill dialog box.

To select an existing set of rectangle-fill commands, highlight the desired set of Rectangle Rill commands to edit on the minidriver's Printer Data window. Then, double click on the selection to display the Rectangle Fill dialog box.

The Rectangle Fill dialog box controls specify rectangle-fill data and commands for printers with rectangle-fill capabilities. Typically, the only printers that provide these capabilities are printers that support a page-control language such as the HPPCL. The data supplied in the Rectangle Fill dialog box describes the printer's minimum and maximum gray levels, the cursor position at the conclusion of a rectangle-fill operation, and so on. The commands supplied in the Rectangle Fill dialog box specify the rectangle's dimensions and fill pattern.

When you finish entering data in the Rectangle Fill dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Minimum Gray Level

The wMinGray box contains the minimum percentage value that the Unidriver can pass as an argument in the printer's gray-fill command.

Diconix 150 Plus: The wMinGray box is empty.

HP LaserJet IIP: Use 1 for the minimum percentage of black pixels. (This means that there is 1 black pixel for every 99 white pixels in the minimum shade or fill pattern.)

Maximum Gray Level

The wMaxGray box contains the maximum value that the Unidriver can pass as an argument in the printer's gray-fill command.

Diconix 150 Plus: The wMaxGray box is empty.

HP LaserJet IIP: Use 100 for the maximum percentage of black pixels. (This means that there are 100 black pixels and 0 white pixels in the maximum shade or fill pattern.)

General Rectangle-Fill Dialog Box

Click the fGeneral button to display the fGeneral dialog box. The fGeneral dialog box controls specify general rectangle-fill data as follows:

Box	Description
RF_WHITE_ABLE	(not supported by Windows NT)
RF_MIN_IS_WHITE	(not supported by Windows NT)
RF_CUR_X_END	The cursor is aligned with the right edge of the rectangle after a rectangle-fill operation. If this box is not checked, the cursor is positioned at the rectangle origin after the fill operation.
RF_CUR_Y_END	The cursor is aligned with the bottom edge of the rectangle after a rectangle-fill operation. If this box is not checked, the cursor is positioned at the rectangle origin after the fill operation.
Diconix 150 Plus: None of the boxes are checked.

HP LaserJet IIP: Check the RF_WHITE_ABLE box to indicate that the HP LaserJet IIP can use the White-fill command.

Rectangle Width

The X Size command that sets the rectangle width.

Diconix 150 Plus: The X Size box is empty.

HP LaserJet IIP: Use the Horizontal Rectangle Size command (ESC*cnA) to specify the rectangle's width in 1/300 inch units. The argument n specifies the number of units.

To specify the command, type the following in the X Size box:

\x1B*c%dA

Rectangle Height

The Y Size command sets the rectangle height.

Diconix 150 Plus: The Y Size box is empty.

HP LaserJet IIP: Use the Vertical Rectangle Size command (ESC*cnB) to specify the rectangle's height in 1/300 inch units. The argument n specifies the number of units.

To specify the command, type the following in the Y Size box:

\x1B*c%dB

Gray Fill

The Gray Fill command fills a rectangle with a shade of gray.

Diconix 150 Plus: The Gray Fill box is empty.

HP LaserJet IIP: The Area Fill ID and the Fill Rectangular Area commands are combined into a single command. The Area Fill ID command (ESC*cnG) specifies the shade of gray, and the Fill Rectangular Area command (ESC*cnP) fills a rectangular area.

For the Area Fill ID command, n specifies the percent of shading. For the Fill Rectangular Area command, n specifies the type of fill and can be one of these values:

Value	Fill
0	Black
1	White
2	Shading
3	Cross-hatch
5	Current pattern
To specify the combination, type the following in the Gray Fill box:

\x1B*c%dG2P

White Fill

(not supported by Windows NT)

Hatch Fill

(not supported by Windows NT)


Image Control Dialog Box

(Not currently supported)


Print Density Dialog Box

(Not currently supported)


Font Information

  Font Information

The following topics describe how to specify font information for your printer, including the Printer Font Metric (PFM) file, the Character-Translation Table (CTT), the font-cartridge commands and data, the font-simulation commands and data, and the downloadable-font commands and data.

  Text Qualities Dialog Box

  Font Cartridges Dialog Box

  Font Simulation Dialog Box

  Download Information Dialog Box


Text Qualities Dialog Box

This feature is not currently supported.


Font Cartridges Dialog Box

A number of font cartridges can be set up for the minidriver. To specify font cartridges for the minidriver, select Font Info from the Printer Data menu on the minidriver's Printer Data window. Then select FontCart to display the initial Font Cartridge dialog box.

To select an existing font cartridge, highlight the desired set of Font Cartridges commands to edit on the minidriver's Printer Data window. Then double click on the selection to display the Font Cartridge dialog box.

Some printers provide a slot for removable cartridges that contain device fonts. The Font Cartridge dialog box contains controls that you use to identify supported cartridges and the fonts that each contains.

Note  The examples for the HP LaserJet IIP printer assume the printer uses the Microsoft 1A cartridge, one of 33 cartridges supported by the HP LaserJet printer.

Note  The fGeneral button on the Font Cartridge dialog box is not in use at this time and does not require entry.

When you finish entering data in the Font Cartridge dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Name of Cartridge

The Name of Cartridge box specifies the selected font-cartridge name.

HP LaserJet IIP: Contains the string, "Z: Microsoft 1A", which identifies the Microsoft 1A font cartridge.

Portrait Fonts

The Portrait Fonts box specifies the names of portrait fonts supported by a cartridge. Unitool copies the names of all the PFM font files used by the minidriver into this control. Specify which fonts are supported on a particular cartridge by selecting the correct names with the cursor and clicking the mouse button to highlight the selection.

HP LaserJet IIP: Sixteen of the 303 device fonts are supported on the Microsoft 1A cartridge. The strings that identify these fonts (numbered 184 − 191 and 193 − 200) are highlighted.

Landscape Fonts

The LandScape Fonts box specifies the names of landscape fonts supported by a cartridge. Unitool copies the names of all the PFM font files used by the minidriver into this control. Specify which fonts are supported on a particular cartridge by selecting the correct names with the cursor and clicking the mouse button to highlight the selection.

HP LaserJet IIP: One of the 303 device fonts is supported in landscape mode on the Microsoft 1A cartridge. The string that identifies this font (numbered 192) is highlighted.


Font Simulation Dialog Box

A number of sets of font simulation commands can be set up for the minidriver. To specify font simulation commands, select Font Info from the Printer Data menu on the minidriver's Printer Data window. Then select FontSim to display the initial Font Simulation dialog box.

To select an existing set of font simulation commands, highlight the desired set of Font Simulation commands to edit on the minidriver's Printer Data window. Then double click on the selection to display the Font Simulation dialog box.

A font-simulation is a capability of simulating italic, bold, underlined, strikeout, or white text from a normal device font. The Font Simulation dialog box identifies the font-simulation commands and data that your printer supports. Most printers provide at least some font simulations for device fonts. The font-simulation commands described in this topic are assumed to be applicable to all device fonts. There are two exceptions:

•	A separate PFM file for fonts is defined in the minidriver.

•	The fGeneral dialog box in the PFM file inhibits font simulations.

All font simulation is performed by the Windows NT GDI. As a result, none of the font simulation, except FS_OCD_WHITE_TEXT_ON and  FS_OCD_WHITE_TEXT_OFF are in use.

To enable the bold, italic, strikeout, and white font simulations for a single printer model, set the corresponding bits in the fGeneral dialog box in the MODELDATA data structure for each printer model.

The fGeneral button on the Font Simulation dialog box is not in use at this time and does not require entry.

When you finish entering data in the Font Simulation dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

FS_OCD_BOLD_ON

The FS_OCD_BOLD_ON command enables bold simulations for a printer.

Diconix 150 Plus: Use the Emphasized Mode On command (ESCE).

To specify the command, type the following in the FS_OCD_BOLD_ON box:

\x1BE

HP LaserJet IIP: Use the Stroke Weight command (ESC(snB) to specify the thickness of the strokes that compose a character. If n is -3, the stroke is thin; if n is 0, the stroke is normal; if n is 3, the stroke is bold.

Note  When the TC_EA_DOUBLE box in the fText dialog box of the Model Data dialog box is not checked, the Unidriver does not perform bold simulations. The FS_OCD_BOLD_ON command is used to override the TC_EA_DOUBLE check box.

To specify the command that enables bold output, type the following in the FS_OCD_BOLD_ON box:

\x1B(s3B

FS_OCD_BOLD_OFF

The FS_OCD_BOLD_OFF command disables bold simulations for a printer.

Diconix 150 Plus: Use the Emphasized Mode Off command (ESCF).

To specify the command, type the following in the FS_OCD_BOLD_OFF box:

\x1BF

HP LaserJet IIP: Use the Stroke Weight command (ESC(snB) to specify the thickness of the strokes that compose a character. If n is -3, the stroke is thin; if n is 0, the stroke is normal; if n is 3, the stroke is bold.

To specify the command that disables bold output, type the following in the FS_OCD_BOLD_OFF box:

\x1B(s0B

FS_OCD_ITALIC_ON

The FS_OCD_ITALIC_ON command enables italic simulations for a printer.

Diconix 150 Plus: Use the Italic Mode On command (ESC4) to enable italic simulations.

To specify the command, type the following in the FS_OCD_ITALIC_ON box:

\x1B4

HP LaserJet IIP: Use the font-style command (ESC(snS). If n is 1, the characters are italicized; if n is 0, the characters are plain text.

Note  When the TC_IA_ABLE box in the fText dialog box of the Model Data dialog box is not checked, the Unidriver does not perform italic simulations. The FS_OCD_ITALIC_ON command is used to override the TC_IA_ABLE check box.

To specify the command, type the following in the FS_OCD_ITALIC_ON box:

\x1B(s1S

FS_OCD_ITALIC_OFF

The FS_OCD_ITALIC_OFF command disables italic simulations for a printer.

Diconix 150 Plus: Use the Italic Mode Off command (ESC5).

To specify the command, type the following in the FS_OCD_ITALIC_OFF box:

\x1B5

HP LaserJet IIP: Use the font-style command (ESC(snS) to specify if the font is italicized or plain text. If n is 1, the characters are italicized; if n is 0, they are plain text.

To specify plain text, type the following in the FS_OCD_ITALIC_OFF box:

\x1B(s0S

FS_OCD_UNDERLINE_ON

The FS_OCD_UNDERLINE_ON command enables underline simulations for a printer.

Diconix 150 Plus: Use the Underline Mode command (ESC-n) to enable and disable the underline font simulation. If n is 1, the font simulation is enabled; if n is 0, the font simulation is disabled.

To specify the command, type the following in the FS_OCD_UNDERLINE_ON box:

\x1B-\x01

HP LaserJet IIP: Use the Underline command (ESC&dnD) to enable fixed- and floating-position underlining. If n is 0, fixed-position underlining is enabled; if n is 1, floating-position underlining is enabled. The Unidriver performs underline simulations.

To specify the command, type the following in the FS_OCD_UNDERLINE_ON box:

\x1B&dD

FS_OCD_UNDERLINE_OFF

The FS_OCD_UNDERLINE_OFF command disables underline simulations for a printer.

Diconix 150 Plus: Use the Underline Mode command (ESC-n) to enable and disable the underline font simulation. If n is 1, the font simulation is enabled; if n is 0, the font simulation is disabled.

To specify the command, type the following in the FS_OCD_UNDERLINE_OFF box:

\x1B-\x00

HP LaserJet IIP: Use the Disable Underline command (ESC&d@) to disable fixed- and floating-position underlining.

To specify the command, type the following in the FS_OCD_UNDERLINE_OFF box:

\x1B&d@

FS_OCD_DOUBLEUNDERLINE_ON

The FS_OCD_DOUBLEUNDERLINE_ON command enables double-underline simulations for a printer.

Diconix 150 Plus: Does not support double-underlining. The FS_OCD_DOUBLEUNDERLINE_ON box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_DOUBLEUNDERLINE_OFF

The FS_OCD_DOUBLEUNDERLINE_OFF command disables double-underline simulations for a printer.

Diconix 150 Plus: Des not support double-underlining. The FS_OCD_DOUBLEUNDERLINE_OFF box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_STRIKETHRU_ON

The FS_OCD_STRIKETHRU_ON command enables the strikethrough simulations for a printer.

Diconix 150 Plus: Does not support strikethrough text. The FS_OCD_STRIKETHRU_ON box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_STRIKETHRU_OFF

The FS_OCD_STRIKETHRU_OFF command disables the strikethrough simulations for a printer.

Diconix 150 Plus: Does not support strikethrough text. The FS_OCD_STRIKETHRU_OFF box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_WHITE_TEXT_ON

The FS_OCD_WHITE_TEXT_ON command enables the white text simulations for a printer.

Diconix 150 Plus: Does not support white text. The FS_OCD_WHITE_TEXT_ON box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_WHITE_TEXT_OFF

The FS_OCD_WHITE_TEXT_OFF box command disables the white text simulations for a printer.

Diconix 150 Plus: Does not support white text. The FS_OCD_WHITE_TEXT_OFF box is empty.

HP LaserJet IIP: Same as Diconix 150 Plus.

FS_OCD_SINGLE_BYTE

The FS_OCD_SINGLE_BYTE command ends KANJI mode.

FS_OCD_DOUBLE_BYTE

The FS_OCD_DOUBLE_BYTE command starts KANJI mode.

FS_OCD_VERT_ON

The FS_OCD_VERT_ON command starts KANJI vertical mode.

FS_OCD_VERT_OFF

The FS_OCD_VERT_OFF command ends KANJI vertical mode.

sBoldExtra

(not supported by Windows NT)

sItalicExtra

(not supported by Windows NT)

sBoldItalicExtra

(not supported by Windows NT)


Download Information Dialog Box

A number of sets of downloadable font commands can be set up for the minidriver. To specify downloadable font commands, select Font Info from the Printer Data menu on the minidriver's Printer Data window. Then select DownloadInfo to display the initial Download Info dialog box.

To select an existing set of downloadable font commands, highlight the desired set of DownLoad Info commands to edit on the minidriver's Printer Data window. Then double click on the selection to display the Download Info dialog box.

The Download Info dialog box supports the commands and data required to download soft fonts for Hewlett Packard printers. These printer operate using HPPCL. Downloading fonts to other types of printer models is not supported by the Unidriver. A soft font is a special font stored on a disk and copied or downloaded to the printer's RAM before it can be used.

A soft font has two components: the font-descriptor component and the character-descriptor component. The font-descriptor component specifies the font's metrics (measurements such as the character-cell dimensions, pitch, x-height, stroke weight, and so on). The character-component contains bitmaps for individual characters in a soft font.

Soft fonts are temporary as opposed to permanent cartridge- or ROM-resident fonts. When a printer is reset, soft fonts are deleted. This information is needed to download TrueType fonts to the HP LaserJet Series II, and later HP LaserJet printers. The Unidriver supports downloading TrueType fonts as bitmapped fonts, but not as downloaded scalable fonts.

When you finish entering data in the Download Info dialog box:

•	Click the OK button to accept the additions or changes.

•	Click the Add button to add an additional set of commands.

•	Use the Previous or Next buttons to page to the preceding or next set of commands.

•	Click the Delete button to delete a set of commands.

Font ID Value Limits

The HPPCL requires a special identifier to be assigned to a soft font before downloading. The Minimum ID and Maximum ID boxes specify the minimum and maximum allowable font ID values.

Note  The ID values listed apply only to downloaded TrueType fonts. Other downloaded fonts installed with the font installer use ID values supplied to the font installer.

HP LaserJet IIP: 1 is used to specify the minimum allowable font ID for the Minimum ID box. The Maximum ID box specifies the maximum allowable font ID value.

Bitmap Font Information

The Bitmap Font Info box contains the cbBitMapFontDescriptor and cbBitMapCharDescriptor controls that specify the font size and character-size, in bytes. They are descriptors for a bitmapped font.

HP LaserJet IIP: Use 64 for the cbBitMapFontDescriptor box and 16 for the cbBitMapCharDescriptor box. The character descriptor for each symbol in the font requires 16 bytes.

Maximum Font Count

The sMaxFontCount box specifies the maximum number of fonts that can be downloaded at any given point in time.

HP LaserJet IIP: Use -1 for the sMaxFontCount box. This means the number of fonts that can be downloaded to the printer is unlimited (except by available printer memory).

General Download Information Dialog Box

Click the fGeneral button to display the fGeneral dialog box. The fGeneral dialog box contains boxes that specify printer limitations and features related to downloaded fonts as follows:

Control	Description
DLI_GEN_MEMORY	The number of downloaded fonts is limited by available memory.
DLI_GEN_DIJOB	The printer downloads fonts on a per-job basis.
DLI_GEN_DLPAGE	The printer downloads fonts on a per-page basis.
DLI_GEN_PT_IDS	The printer requires a font ID value in order to make the font temporary or permanent.
DLI_GEN_FNTDEL_ ANYWHERE	Fonts can be deleted anywhere on the page. By default, fonts may be deleted only at page boundaries.
HP LaserJet IIP: Check the DLI_GEN_MEMORY box and the DLI_GEN_PT_IDS box.

Format Information Dialog Box

Click the fFormat button to display the fFormat dialog box. The fFormat dialog box provides information that the Unidriver uses to support TrueType on Hewlett-Packard printers that use HPPCL. The fFormat dialog box has these controls:

Control	Description
DLI_FMT_PCL	The printer uses HPPCL.
DLI_FMT_INCREMENT	The printer downloads only those characters required to print a single job. If this box is not checked, the Unidriver downloads the entire character set to the printer for a given font.
DLI_FMT_PCL_RESSPEC	The printer supports HPPCL bitmap fonts in which the x and y resolutions are specified at the end of the download header.
DLI_FMT_OUTLINE	(not supported by Windows NT)
DLI_FMT_CAPSL	The printer supports CaPSL style font downloading.
DLI_FMT_PPDS	The printer supports PPDS style font downloading.
DLI_FMT_CALLBACK	Downloading is supported by a callback function. For more information about the callback function, see Minidriver Callback Functions.
HP LaserJet IIP: Check the DLI_FMT_PCL and the DLI_FMT_INCREMENT boxes.

DLI_OCD_BEGIN_DL_JOB

The DLI_OCD_BEGIN_DL_JOB command begins downloading.

HP LaserJet IIP: The DLI_OCD_BEGIN_DL_JOB box is empty.

DLI_OCD_BEGIN_FONT_DL

The DLI_OCD_BEGIN_FONT_DL command begins downloading fonts.

HP LaserJet IIP: The DLI_OCD_BEGIN_FONT_DL box is empty.

DLI_OCD_SET_FONT_ID

The DLI_OCD_SET_FONT_ID command sets the identifier of the font. This command assigns an integer value to a downloadable font. This integer value is the value that the Unidriver uses to refer to the font.

HP LaserJet IIP: Use the Assign Font ID command (ESC*cnD) to assign an ID value to a font. This value can be used to select or delete the font after it is downloaded.

To specify the command, type the following in the DLI_OCD_SET_FONT_ID box:

\x1B*c%dD

DLI_OCD_SEND_FONT_DESCRIPTOR

The DLI_OCD_SEND_FONT_DESCRIPTOR command downloads the font-descriptor data to a printer.

HP LaserJet IIP: Use the Font Descriptor command (ESC)snW) to download font descriptor data to the printer for the font whose ID is specified by the argument n. Font Descriptor data is data that is common to all characters in a font; this data includes: the dimensions of the character cell, the orientation of the characters, the x-height, the stroke weight, the first character code, the last character code, and so on.

To specify the command, type the following string in the DLI_OCD_SEND_FONT_DESCRIPTOR box:

\x1B)s%dW

DLI_OCD_SELECT_FONT_ID

The DLI_OCD_SELECT_FONT_ID command selects the downloadable font identified by a particular integer value.

HP LaserJet IIP: Use the Font Selection by ID command (ESC(nX) to select the downloaded font with the ID value of n.

To specify the command, type the following string in the DLI_OCD_SELECT_FONT_ID box:

\x1B(%dX

DLI_OCD_SET_CHAR_CODE

The DLI_OCD_SET_CHAR_CODE command identifies the next character to be printed.

HP LaserJet IIP: Use the Character Code command (ESC*cnE) to designate the character code associated with the next character to be downloaded.

To specify the command, type the following in the DLI_OCD_SET_CHAR_CODE box:

\x1B*c%dE

DLI_OCD_SEND_CHAR_DESCRIPTOR

The DLI_OCD_SEND_CHAR_DESCRIPTOR command downloads the character-descriptor and character-data components for a font.

HP LaserJet IIP: Use the Character Descriptor and Data command (ESC(snW) to download n bytes of character descriptors and character data for a font.

To specify the command, type the following in the DLI_OCD_SEND_CHAR_DESCRIPTOR box:

\x1B(s%dW

DLI_OCD_END_FONT_DL

The DLI_OCD_END_FONT_DL command signals the completion of the download-font process.

HP LaserJet IIP: The DLI_OCD_END_FONT_DL box is empty.

DLI_OCD_MAKE_PERM

The DLI_OCD_MAKE_PERM command makes a downloadable font permanent.

HP LaserJet IIP: Use the Font Control command (ESC*cnF) to delete downloaded fonts, make downloaded fonts temporary, make downloaded fonts permanent, and so on. If n is 5, the font is made permanent.

To specify the command that makes a font permanent, type the following in the DLI_OCD_MAKE_PERM box:

\x1B*c5F

DLI_OCD_MAKE_TEMP

The DLI_OCD_MAKE_TEMP command makes a downloadable font temporary.

HP LaserJet IIP: Use the Font Control command (ESC*cnF) to delete downloaded fonts, make downloaded fonts temporary, make downloaded fonts permanent, and so on. If n is 4, the font is made temporary.

To specify the command that makes a font temporary, type following in the DLI_OCD_MAKE_TEMP box:

\x1B*c4F

DLI_OCD_END_DL_JOB

The DLI_OCD_END_DL_JOB command signals the completion of a print-job that used downloaded fonts.

HP LaserJet IIP: Not required. The DLI_OCD_END_DL_JOB box is empty.

DLI_OCD_DEL_FONT

The DLI_OCD_DEL_FONT command deletes a single downloaded font from the printer's memory.

HP LaserJet IIP: Use the Font Control command (ESC*cnF) to delete downloaded fonts, make downloaded fonts temporary, make downloaded fonts permanent, and so on. If n is 2, the font whose ID was last specified is deleted.

To specify the command that deletes the last identified downloaded font, type the following in the DLI_OCD_DEL_FONT box:

\x1B*c2F

DLI_OCD_DEL_ALL_FONTS

The DLI_OCD_DEL_ALL_FONTS command deletes all downloaded fonts from the printer's memory.

HP LaserJet IIP: Use the Font Control command (ESC*cnF) to delete downloaded fonts, make downloaded fonts temporary, make downloaded fonts permanent, and so on. If n is 0, all downloaded fonts are deleted.

To specify the command that deletes all downloaded fonts, type the following in the DLI_OCD_DEL_ALL_FONTS box:

\x1B*c0F

DLI_OCD_SET_SECOND_FONT_ID

The DLI_OCD_SET_SECOND_FONT_ID command sends printer control codes that designate a font identifier. For languages that only support 128 characters per downloaded font (for example, CaPSL), the identifier is that of the secondary character set (128-255).The printing engine or font installer supplies font identifiers.

HP LaserJet IIP: The DLI_OCD_SET_SECOND_FONT_ID box is empty.

DLI_OCD_SELECT_SECOND_FONT_ID

The DLI_OCD_SELECT_SECOND_FONT_ID command selects the specified downloaded font. For languages that only support 128 characters per downloaded font (for example, CaPSL), the command selects the secondary character set (128-255).

HP LaserJet IIP: The DLI_OCD_SELECT_SECOND_FONT_ID box is empty.


Model Data

  Model Data

  Model-Specific Data

  Model Data Dialog Box


Model-Specific Data

After you specify master units, control information, paper information, graphics information, and font information for your printer, you need to enter model-specific data. The following topic provides information on entering model-specific data.


Model Data Dialog Box

A number of sets of printer model commands can be set up for the minidriver. To specify printer model commands, select ModelData from the Printer Data menu on the minidriver's Printer Data window. Then, select Resolution to display the initial ModelData dialog box.

To select an existing set of printer model commands, highlight the desired set of Printer Models to edit on the minidriver's Printer Data window. Then, double click on the selection to display the ModelData dialog box. Most of the printer model-specific data is entered in the ModelData dialog box.

When you finish entering data into the ModelData dialog box:

•	Click the OK button to accept additions or changes.

•	Click the Add Model button to add an additional set of printer model commands.

•	Use the Cut Model or Paste Model buttons to cut or paste a set of printer model commands to another minidriver.

•	Click the Delete Model button to delete a set of printer model commands.

Name of Model

The Name of Model control specifies a printer's model name. Click the Next Model or Previous Model buttons as needed to display the appropriate printer name or enter a new model name and select the Add button.

If a driver supports two models that are identical except for the name, the names are separated by a percent sign (%). For example, HP LaserJet%HP LaserJet IIP Plus for the HP LaserJet IIP and HP LaserJet IIP Plus printers.

Page-Size Limits

The Page Size Limits controls specify the minimum allowable physical page size and the maximum printable region widths and heights in master units for user-defined paper sizes. If the minidriver supports user-defined paper sizes and the appropriate controls in the Paper Sizes dialog box are initialized, set the Page Size Limits controls.

Diconix 150 Plus: The maximum allowable printable width is imposed by the model and is set to 6624 (6.9 inches as expressed in master units). The Diconix printer does not impose any paper-length constraints. For example, an arbitrary length of 24 inches was chosen that translates into 13,824 vertical master units (24 * 576).

The minimum allowable width for the Diconix printer is imposed by the rubber rollers on the bail arm. These rollers can be adjusted from 6 to 8 inches apart imposing the smallest allowable paper width of 6 inches, which translates into 1,924 horizontal master units (6 * 320). The minimum allowable height is the distance from the entrance of the paper-feed slot to the top bail arm. This distance is 3.5 inches or 2,016 vertical master units (3.5 * 576).

HP LaserJet IIP: The maximum allowable printable width is 8 inches. This value translates into 2400 horizontal master units (8 * 300). The maximum allowable printable height is 13 inches. This value translates into 3900 master units (13 * 300). The minimum allowable page width and height is one inch. This value translates into 300 master units (1 * 300).

Supported Attributes

The Supported Attributes list box contains the names of each of the related dialog boxes. These dialog boxes correspond to the Control Info, Paper Info, Graphics Info, Vector Info, and Font Info selections accessible by using the Printer Data menu. To select a name from the Supported Attributes list, scroll to and highlight the desired name. Then double click the name to display the dialog box containing a list of the current setups. Each dialog box contains the same list of current setups that is shown in the separate box listings on the minidriver's Printer Data window.

When the requested dialog list box is displayed, select the default setting from the Default list box. Next, highlight the appropriate items in the list and click one of the following buttons as needed:

Control	Description
Enable All	Enable all selected items.
Inhibit All	Disable all selected items.
Cancel	Cancel the dialog box.
OK	Accept the selected items and the default setting.
Capability Bitfields

The Capability Bitfields list box contains the names of dialog boxes that specify the capabilities of your printer. You select a dialog box by double-clicking its name.

The fCurves, fLines, fPolygonals, and fClip dialog boxes describe the vector graphics capabilities of the printer. If your driver must support a particular vector graphics capability, it must set the appropriate bit indicating it supports this capability and must contain code to handle the device driver interface (DDI) call for this capability without calling UNIDRV.DLL. For example, if the CC_CIRCLES bit in fCurves is set, your driver must handle the DDI Output function when the output style is OS_CIRCLE. If your minidriver does not contain this code, or if your printer does not have vector capabilities, you should not set any of the vector graphics capability bits. For vector-capable devices, these bits should be set so that they correspond to the vector commands that you defined through the Printer Data menu.

General Capabilities Dialog Box

The fGeneral dialog box identifies printer capabilities such as double-sided printing, multiple-copy printing, font rotation capabilities, bitmap rotation capabilities, and so on. The fGeneral dialog box has these controls:

Control	Description
MD_SERIAL	Output must be sorted sequentially in the y-direction, because the printer cannot scroll backwards.
MD_ROTATE_FONT_ABLE	The printer can rotate hardware fonts to match the current paper orientation. Fonts supplied by Windows (TrueType, bitmap, and vector) are always available in both orientations.
MD_COPIES	The printer supports multiple-copy printing.
MD_DUPLEX	The printer supports double-sided printing.
MD_NO_ADJACENT	The printer cannot fire adjacent pins on the print head in all resolutions. If adjacent pins can be fired in some resolutions but not others, this should be indicated for each resolution.
MD_LANDSCAPE_GRX_ABLE	The printer can rotate a graphic image (or bitmap) to match the current paper orientation. If the printer is unable to rotate graphics, the Universal Printer Driver will perform the graphic rotation.
MD_ALIGN_BASELINE	The printer aligns text output on the baseline rather than the top of the character bounding-box. (The default alignment is the top of the bounding box.)
MD_FONT_MEMCFG	(not supported by Windows NT)
MD_LANDSCAPE_RT90	The printer rotates 90 degrees in the counterclockwise direction for landscape output (this means that the right side of a page or image is printed first). If this control is not set, the default rotation of 270 degrees in the counterclockwise direction is assumed. Only set this control if the printer supports a set-orientation command.
MD_USE_CURSOR_ORIG	The cursor origin is calculated using the values entered in the cursor origin controls of the Paper Sizes dialog box.  If the MD_USE_CURSOR_ORIG is not set, the cursor origin is the upper-left corner of the printable region.
MD_WHITE_TEXT	The printer can print white text on a black background. The Universal Printer Driver uses the commands you entered in the Font Simulation dialog box to turn white text printing on and off.
MD_PCL_PAGEPROTECT	The printer supports HP PCL5-style page protection. The Universal Printer Driver uses the commands you entered in the Paper Sizes dialog box to set the page protection mode.
MD_MARGINS	(not supported by Windows NT)
MD_CMD_CALLBACK	(not supported by Windows NT)
MD_MEMRES	(not supported by Windows NT)
Diconix 150 Plus: Check the MD_SERIAL box.

HP LaserJet IIP: Check the MD_PARAMETERIZE, MD_COPIES, MD_ALIGN_BASELINE, MD_LANDSCAPE_RT90, and MD_USE_CURSOR_ORIG boxes.

Curve Capabilities Dialog Box

(Not currently supported)

Line Capabilities Dialog Box

(Not currently supported)

Polygon Capabilities Dialog Box

(Not currently supported)

Text Capabilities Dialog Box

The fText and fLText dialog boxes identify text-rendering capabilities in portrait and landscape mode when the selected font is a device font. (The fLText dialog box is identical to the fText dialog box; the fText dialog box specifies text rendering capabilities in portrait mode, and the fLText dialog box specifies text rendering capabilities in landscape mode.) The fText and fLText dialog boxes have these controls:

Control	Description
TC_OP_CHARACTER	Device supports OutputPrecision CHARACTER. This bit should be set if the device has any hardware fonts.
TC_OP_STROKE	Device supports OutputPrecision STROKE. (Not used.)
TC_CP_STROKE	Device supports ClipPrecision STROKE. (Not used.)
TC_CR_90	Device fonts may be rotated at 90-degree increments independent of current page orientation. (Not used.)
TC_CR_ANY	Device supports character rotation (variable) independent of current page orientation. (Not used.)
TC_SF_X_YINDEP	Device supports scaling independent of X and Y.
TC_SA_DOUBLE	Device supports doubled character for scaling.
TC_SA_INTEGER	Device supports integer multiples for scaling.
TC_SA_CONTIN	Device supports any multiples for scaling.
TC_EA_DOUBLE	Device supports bold characters.
TC_IA_ABLE	Device supports italicized characters.
TC_UA_ABLE	Device supports underlined characters.
TC_SO_ABLE	Device supports strikeout characters.
TC_RA_ABLE	Device can printer raster fonts. Indicates that GDI should enumerate any raster fonts available for this device in response to the EnumFonts function. If this bit is not set, GDI supplied raster fonts will not be enumerated in response to EnumFonts, although device fonts, TrueType fonts, and GDI vector fonts will continue to be enumerated.
TC_VA_ABLE	Device can print vector fonts. (Not used.)
Diconix 150 Plus: Check the TC_OP_CHARACTER, TC_EA_DOUBLE, TC_IA_ABLE, TC_UA_ABLE, and TC_RA_ABLE boxes.

HP LaserJet IIP: Check the TC_UA_ABLE box.

Clipping Capabilities Dialog Box

(Not currently supported)

Raster Capabilities Dialog Box

(Not currently supported)

Left Margin Width

The sLeftMargin box specifies the width of the unprintable region on the left edge of the page. Typically, this value is set only for dot-matrix printers and is specified in master units.

Diconix 150 Plus: Use 768. This value is converted from horizontal master units (using the Xdpi value from the master-units dialog box). The maximum printable page width is 6.9 inches. Subtracting this value (6.9 inches) from the width of a paper page (8.5 inches) leaves 1.6 inches for the borders of the page. Dividing 1.6 by 2 leaves .8 inches. This is the width of the left and right borders.

HP LaserJet IIP: Use 50. The unprintable left-margin measures .166 inches. Convert this value to master units (300 * .166 = 50).

Maximum Physical Page Width

The sMaxPhysWidth box specifies the maximum allowable physical page width in master units.

Diconix 150 Plus: Use 8160. This value is converted from horizontal master-units (using the Xdpi value from the master-units dialog box). The maximum physical page width the printer can handle is 8.5 inches.

HP LaserJet IIP:Use 2550. This value is converted from horizontal master units (300 * 8.5 = 2550).

Maximum Number of Fonts per Page

The sMaxFontsPage box specifies the maximum number of device fonts on a single page. If there is no limit to the number of device fonts allowed on a printer, this value is -1.

Diconix 150 Plus: Use -1.

HP LaserJet IIP: Use -1.

Number of Cartridge Slots

The sCartSlots box specifies the number of font-cartridge slots on the printer.

Diconix 150 Plus: Use 0.

HP LaserJet IIP: Use 1.

Default Character-Translation Table

The Default CTT ID box identifies the default CTT. If a single CTT is used for all device fonts, this value can be entered in the Default CTT control in the ModelData dialog box. If the CTT for the fonts is provided by the Unidriver, the Default CTT is that CTT ID multiplied by -1. If the Unidriver uses a driver-supplied CTT, the Default CTT value is a positive integer. The Default CTT is zero if the Unidriver does not use a single CTT.

Diconix 150 Plus: Use 1.

HP LaserJet IIP: Use 0.

Default Font ID

The Default Font ID box identifies the default font that the Unidriver uses for text output when an application fails to request a specific font set. The default font for a fixed pitch font is 10 point and 10 characters per inch, if possible.

Diconix 150 Plus: Use 1.

HP LaserJet IIP: Use 225.

LookAhead Region

The LookAhead Region box specifies the length of the LookAhead Region in master units. This value is 0 for most printer models. A nonzero value is required for HP DeskJet printers.

Diconix 150 Plus: Use 0.

HP LaserJet IIP: Use 0.

Resident Fonts Dialog Box

Click the Resident Fonts button to display the Resident Fonts dialog box. The Resident Fonts dialog box contains two list boxes for device fonts. The list box on the left side contains the names of Portrait Fonts. The list box on the right side contains the names of Landscape Fonts. The fonts considered to be resident on the device are highlighted.

To select fonts in either list, highlight each of the desired fonts or click the Select All button to select all of the device fonts. Click Clear All to clear all of the current selections. When complete, click OK to accept the selections.

Diconix 150 Plus: The only resident font is 10-point Times Roman for portrait mode.

HP LaserJet IIP: Several fonts are available in both portrait and landscape orientation and are selected in each control.

Memory Configuration Dialog Box

Click the Memory Config button to display the Memory Configuration dialog box. This dialog box contains a list of possible printer memory configurations ranging from 65K/128K to 5820K/17M.

The value in the left column specifies the amount of memory available to the Unidriver to store downloaded font data and bitmap raster data. The value in the right column specifies the amount of memory to be displayed as available. Because the printer typically reserves some memory for its own use, these two values are rarely the same.

If the printer supports HPPCL and the driver supports downloadable fonts, select the memory configurations for the device. A memory configuration is defined as the amount of RAM available on the printer to store raster bitmap graphics and download font information.

To select memory configurations, highlight each of the necessary configurations or click the Enable All button to select all of the device fonts. (Click Inhibit All to clear all of the current selections). When complete, click OK to accept the selections.

Diconix 150 Plus: No memory configurations are selected.

HP LaserJet IIP: The 369/512K, 2243K/2.5M, and 4491K/4.5M configurations are selected. The HP LaserJet IIP comes with 512K of memory.


Printer Font Metrics (PFM)

To access the PFM dialog box and specify the PFM commands, scroll through the FONTS window and select the desired font. Then, double click the selection to display the PFM dialog box for the selected font file.

To render text with device fonts and to retrieve font data for application queries, the Unidriver requires special font data or printer font metrics. The PFM dialog box specifies a printer's font metrics and font selection commands. Printers that render text using device fonts store the character data in the printer or in a font cartridge. (The character data for a Windows font is stored on disk.) Printers render text faster with device fonts because the bitmap or vector data is device resident and does not require downloading from the disk to the printer.

Note  The sample in this section displays a Roman 12-point device font file for the Diconix 150 Plus printer. No sample is provided for the HP LaserJet IIP.

When you finish entering data in the PFM dialog box:

•	Click the Save button to accept changes or additions to the PFM dialog box.

•	Click the SaveAs button to save using another name or storage location.

Font Type

The Type control contains the decimal representation of a 16-bit flag. The following list describes the significance of the bits in this flag. Bit 15 is the high-order bit of the high byte; bit 0 is the low-order bit of the low-order byte.

Bit	Description
0	Specifies a scalable font, if set. Otherwise, the font is a bitmap font.
1	Reserved; must be zero.
2	Specifies that character data is stored at the location specified BitsOffset if set. Otherwise, the character data appears immediately after the header information. (This bit is only valid for font files that contain bitmap data.)
3−6	Reserved; must be zero.
7	Specifies a device font, if set. Otherwise, the font is a GDI font.
8−15	Reserved; must be zero.
Note  The Unidriver does not support scalable device fonts, so the Type value must be set to 128 for all device fonts.

Diconix 150 Plus: Set the Type value to 128 for all device fonts. The only bit set for any of the Diconix device fonts is bit 7, whose value is 128. The device fonts are bitmapped fonts; bit 0 is not set. Bit 1 is reserved and is set to 0. Because the PFM file describes a device font and bitmap character data is not in the PFM file, bit 2 is not set. Bits 3 through 6 are reserved and are set to 0.

Point Size

The Points control contains the point size for the font. The point size is determined by measuring the vertical distance from the bottom edge to the top edge of a character cell for a font. Specify the value in printer points; each printer point is equivalent to approximately 1/72 of an inch.

Note  Most applications do not use this box to display point sizes to the user because fractional point sizes cannot be expressed. Most applications calculate point size as the sum of the value of the PixHeight and Internal Leading controls in the PFM dialog box.

Diconix 150 Plus: Use 10 for the point size.

Vertical Resolution

Most printer manufacturers digitize their fonts at the highest resolution supported by the printer. The VertRes control contains the vertical resolution that the printer manufacturer used to digitize a font. Specified this value in dpi.

Diconix 150 Plus: The fonts are digitized at a vertical resolution of 96 dpi. Use 576 to prevent confusion with calculations between master units for the minidriver, and the units for values in the PFM files.

Horizontal Resolution

The HorzRes control contains a horizontal resolution value that the printer manufacture used to digitize a font.

Diconix 150 Plus: The fonts are digitized at a horizontal resolution of 320 dpi.

Ascent

The Ascent control specifies the distance from the baseline to the top of a character cell. Specified the value in vertical-resolution units.

Diconix 150 Plus: This distance is 7.25 printers points or 58 dpi.

Internal Leading

The Internal Leading control specifies an amount of space reserved in each character cell for accent characters and so on. For most 9- and 24-pin printers, this value is 0. (The point size specified by most applications is the sum of the PixHeight control value and the Internal Leading value.)

Note  Some of the PFM files supplied by Microsoft reflect values compatible with earlier versions of Windows-based printer drivers. For example, Epson and IBM printers have values that are not listed here. However, for recently created drivers, font metric values should reflect how the printer produces device fonts.

Diconix 150 Plus: Use 0 for this value. The device fonts for the Diconix do not support internal leading.

External Leading

The External Leading control specifies the amount of space placed between two rows of text printed using a particular font. Most dot-matrix printer manufacturers suggest printing device fonts at 6 lines to the inch. The External Leading value is increased or decreased to the sum of PixHeight control value added to the External Leading meet value.

Diconix 150 Plus: Use 2 printer points or 16 master units.

Italic Fonts

The Italic control indicates whether the PFM file contains data for an italic font. Use 1 if the font is italic or 0 if it is not.

Diconix 150 Plus: Use 0 (the example font is not italicized).

Underline Fonts

The Underline control indicates whether the PFM file contains data for an underlined font. Use 1 if the font is underlined or 0 if it is not..

Diconix 150 Plus: Use 0 (the example font is not underlined).

Strikeout Fonts

The Strikeout control indicates whether the PFM file contains data for a strikeout font. Use 1 if the font is a strikeout font or 0 if it is not.

Diconix 150 Plus: Use 0 (the example font is not a strikeout font).

Font Weight

The Weight control specifies the relative density or weight of characters rendered using the font. Valid weights can range from 100 to 1000 using increments of the value 100. Specify 400 for normal weight, 700 for bold, and so on. Weights must be a multiple of 100 to be valid.

Diconix 150 Plus: Use 400. The bitmaps for the example font render normal characters.

Character Set

The Char Set control identifies the character set associated with a font. This value is:

•	0 if the font uses the Windows ANSI character set

•	1 if the font is an IBM PC hardware font (code page 437)

•	2 if the font uses a special symbol set

Whenever possible, a minidriver is recommended to support the Windows ANSI character set.

Diconix 150 Plus: Use 0 because the Diconix device fonts use the Windows ANSI character set.

Pixel Width

The PixWidth control specifies the character width for fixed-pitch raster fonts. Specify this value using the horizontal-resolution units (for a variable-width device font, this value is 0).

Diconix 150 Plus: Use 57.

Pixel Height

The PixHeight control specifies the character height of fixed-pitch device fonts. Specify this value using vertical-resolution units.

Diconix 150 Plus: Use 80.

Pitch and Family

The Pitch and Family control contains an integer value that corresponds to a 16-bit binary value. To set this value, click the ? button to display the Font Pitch and Family dialog box. Indicate whether the font is fixed pitch or variable (proportional) spaced. Then, click the Family value to indicate which screen font Windows displays for this device font and click OK.

Diconix 150 Plus: 16 is displayed if the Pitch is Fixed and the Family is Roman.

Average Width

The Average Width control specifies the average character width for proportionally spaced and fixed-pitch fonts. If the font is proportionally spaced, Unitool calculates this value based on the information entered in the font-width table. For a fixed-pitch font, enter this value (equivalent to the width of each character).

Diconix 150 Plus: Use 57.

Maximum Width

The Max. Width control specifies the width of the widest character in a font. For fixed-pitch fonts, this is equivalent to the value specified in the Average Width control. For proportionally spaced fonts, Unitool calculates and inserts this value using values from the character-width table.

Diconix 150 Plus: Use 57.

First Character

The First Char control identifies the ASCII decimal value for the first character in a font's character set.

Diconix 150 Plus: Use 32, which corresponds to the space character.

Last Character

The Last Char control identifies the ASCII decimal value for the last character in a font's character set.

Diconix 150 Plus: Use 126, which corresponds to the tilde (~).

Default Character

The Default Char control identifies the character that Windows renders when a character outside the range defined for First Char through Last Char is requested. This value is a zero-based offset from the first character identified in the Default Char control.

Diconix 150 Plus: Use 14, which corresponds to the period (.).

Break Character

The Break Char control identifies the character used to define word breaks. This value is a zero-based offset from the first character identified in the First Char control.

Diconix 150 Plus: Use 0, which corresponds to the space character.

Bitmap Width

The Width Bytes control specifies the width in bytes of each row of pixels for characters in a raster font. This value is only required for PFM files that contain bitmapped font data.

Diconix 150 Plus: Use 0.

Device Name

The Device Name control specifies the name of the printer.

Diconix 150 Plus: Use the string, Diconix 150 Plus.

Face Name

The Face Name control specifies the font name. If a printer supports multiple fonts with the same font name and point size, but with different pitches, the string also contains the pitch value. Pitch values should be expressed in terms of characters-per-inch (cpi). The font name in a minidriver must be unique.

Diconix 150 Plus: Use the string, Roman(12cpi).

Device Font Character Widths Dialog Box

If the Pitch and Family value indicates that the PFM file for a variable-pitch device font is to be edited, click the FontWidth button to display the Device Font Character Widths dialog box. (If fixed-pitch fonts are used, this box is not active.) Then, enter the values for the widths of each character that falls between the First Char and Last Char ASCII character values. The widths are expressed in horizontal resolution units. If the font uses a CTT, the widths entered reflect the widths of the characters the printer actually produces. Click OK when complete to return to the PFM dialog box.

Extended Text Metrics Dialog Box

This information is used only by applications that specifically request it from the minidriver. To edit values for extended text metrics:

•	Click the ExtTextMetrics button to display the Extended Text Metrics dialog box and to enter or change these values.

•	Click OK to accept these values.

•	Click the Delete button to delete information.

Extent Table Dialog Box

The Extent Table dialog box specifies the width of each character in a scalable font. To edit the extent table values:

•	Click the ExtentTable button to display the Extent Table dialog box and to enter or change these values.

•	Click OK to accept these values.

Kern Pairs Dialog Box

This information is used only by applications that specifically request it from the minidriver. To edit kerning-pair values:

•	Click the KernPair button to display the Kern Pairs dialog box.

•	Click Add to add values for the kern pairs and enter these values.

•	Click Change to change a kern pair and edit the current values.

•	Click Del to delete a kern pair.

Kern Tracks Dialog Box

This information is used only by applications that specifically request it from the minidriver as follows:

•	Click the KernTrack button to display the Kern Tracks dialog box.

•	Click Add to add values for the kern pairs and enter these values.

•	Click Change to change a kern pair and edit the current values.

•	Click Del to delete a kern pair.

Driver Information

The DriverInfo group box at the bottom of the PFM dialog box contains the printer commands that select and cancel the selection of the font as well as additional data that some printers require to render text with a specific font.

Font Selection

The Font Select command selects a particular font.

Diconix 150 Plus: Use the Elite Mode On command (ESCM) to select 10-point and 12-pitch Roman font.

To specify the command, type the following in the Font Select box:

\x1BM

Note  Depending on the printer model, font selection commands can require a combination of printer commands to select the desired font.

Canceling Font Selection

The Font UnSelect command cancels a font selection. For printers that have no x-cursor movement command and rely on the width of the space character to perform horizontal movement, this command selects the font or pitch that causes the printer to move the desired amount for a space character. This command is also required if a printer's font selection command enables attributes that cannot be disabled by a subsequent font select command or inhibit the use of other commands used in the driver.

Diconix 150 Plus: There is no command that cancels the selection of the default font when the printer's switches are set to the factory default. The Font UnSelect box is empty.

Note  Depending on the printer model, font selection commands can require a combination of printer commands to select the desired font.

Vertical Adjustments

The Y Moved and the Y Adjust controls contain vertical offsets required to align a font baseline with the GDI baseline. If these baselines differ, Windows shifts the font baseline by the Y Adjust value prior to rendering text. After the text is rendered, Windows shifts the font baseline back to the proper position using the Y Moved value. Typically, it is not necessary to adjust the Y position for device fonts.

Diconix 150 Plus: Use 0.

Private Font Data

The Private Data control provides a means of storing 16-bits of private data. If a minidriver provides a private function (or private functions) for processing device fonts, it can store data used by these functions using this control.

Diconix 150 Plus: Use 0.

Font Type

The Font Type control specifies the type of scalable font technology the printer uses. It can be one of these values:

Value	Meaning
DF_TYPE_HPINTELLIFONT	HP Intellifont fonts. This is the default value.
DF_TYPE_TRUETYPE	TrueType fonts
DF_TYPE_PST1	not currently supported
DF_TYPE_CAPSL	not currently supported
DF_TYPE_OEM1	not currently supported
DF_TYPE_OEM2	not currently supported
Character Shift Amount

The Shift control specifies a horizontal distance in horizontal-resolution units. This distance is an offset that the Unidriver uses to shift individual characters from a particular font. This distance is required for fonts with characters that are not centered in the bounding box. The Unidriver uses a negative shift value to shift characters to the right, and a positive shift value to shift characters to the left. Shift amounts are used when characters do not fall in the center of the bounding box defined by font metrics.

Diconix 150 Plus: Use 0.

Character-Translation Table

The Trans Tab control identifies the CTT associated with a font. A CTT provides a method of remapping the extended characters used for device fonts to the Windows ANSI set. In the Trans Tab control, negative values identify predefined translation-tables, and positive values identify minidriver-defined translation tables. A value of zero indicates that the CTT is identified in the minidriver's model data. For more information about character-translation tables (CTTs), see Character-Translation Table.

Diconix 150 Plus: Use 0 because the font uses the CTT specified in the ModelData dialog box.

Font Simulation Capabilities (fCaps) Dialog Box

This dialog box is not currently used since the Windows NT GDI performs font simulation.

Diconix 150 Plus:

For the Diconix 150 Plus printer, all font simulations are supported; therefore, none of the checkboxes were selected.


Character-Translation Table

After you have created PFM files for your printer's fonts, you should create a character-translation table (CTT). To create a CTT for a font, scroll through the CTT window and highlight the desired character-translation. Then, double click the selection to display the CTT dialog box for the selected font file.

A CTT is used by the Unidriver to map characters from the Windows ANSI character set to the printer character set to identify the printable characters. The current version of this set contains 256 entries.

The Unidriver provides support for some of the common code pages and symbol sets to eliminate redundancy in a large number of individual printer drivers and permits individual driver to support the less common ones. The Unidriver currently supports the following predefined CTTs:

CTT ID	CTT (Code Page)
-1	IBM Code Page 437
-2	IBM Code Page 850
-3	IBM Code Page 863
If the device font uses extended characters that match either code page 437, 850, or 863, a minidriver can use one of the predefined CTTs provided by the Unidriver. In this case, enter the CTT ID for the CTT in the Trans Tab control of the PFM dialog box. CTTs provided by the Unidriver are referenced from the minidriver through negative numbers that correspond to the resource ID values (from the Unidriver).

When the printer uses the same extended characters for all device font, such as most dot-matrix printers, a minidriver can define the CTT as follows:

1.	Specify a CTT through the Default CTT in the ModelData dialog box and set the Trans Tab value in the PFM dialog box in each PFM file to zero.

2.	Set the Trans Tab values in each PFM file to the appropriate CTT ID value.

For more information, see Printer Font Metric Structure.

Note  If a single CTT is used for the font set, the value can be entered in the Default CTT control of the ModelData dialog box. If the Unidriver uses a driver-supplied CTT, the Default CTT value is a positive integer. The Default CTT is zero if the Unidriver does not use a single CTT. For more information, see Model Data.

Printer drivers supporting device with less common code pages and symbol sets contain their own CTT resources. A given minidriver can mix and match these types of CTTs as needed. CTTs provided by the minidriver are referenced by positive numbers corresponding to the resource ID values (from the minidriver).

When the printer uses a different set of extended characters for each font, such as the HP LaserJet IIP, the minidriver sets each Trans Tab value in each PFM file to the CTT ID value that is appropriate for that font. After the extended character set(s) for the known device fonts is determined, the CTT dialog box is used to create unique CTTs for the device's remaining characters to specify which character codes map to which printer symbols.

Note  The sample in this section displays the CTT dialog box with the EPSONXTA.CTT file for the Diconix 150 Plus printer. No sample is provided for the HP LaserJet IIP.

If the font does not use extended characters (either does not print them, or the characters are italicized versions of the characters below ASCII 127), a CTT is not needed. For these printers, set the Last Char in the PFM dialog box to 127 (or to the last printing ASCII value). In this case, the Default Char in the PFM file is used when an extended character is requested.

When you finish entering data in the CTT dialog box:

•	Click the Save button to accept additions or changes to the CTT file.

•	Click the Save As button to save the CTT using another name or storage location.

First Character

The First Char control identifies the first character in the CTT. The first character in the translation table is 127. Characters below the First Char do not use the CTT and are sent directly to the printer.

Note  The extended characters used by the HP LaserJet IIP printer vary depending on the individual font.

Last Character

The Last Char control identifies the last character in the CTT. Because the CTT for the EPSONXTA.CTT file character set supports characters 127 through 255, this value is 255.

Character Codes

The remaining controls in the CTT dialog box specify a character code or device-command/character-code sequence and maps it to a particular entry in the Windows ANSI set. For example, suppose character code 161 in the Windows ANSI character set is an inverted exclamation point. If this character is available on the printer, place the required printer commands in box 161 in the CTT. If the character is not available, place the default character for that font in that location in the CTT.

There are three formats for the contents of a CTT file. Unitool determines which one is to be used to save a CTT file based on the information entered:

•	1-to-1 (byte to byte) translation (effectively a translation table). Each character code consists of a single byte. For simple remappings, the Unidriver sends the character value entered in the edit control each time the ASCII value is shown.

•	2-to-1 (two bytes to one byte) translation. Each character code consists of either one of two characters. The Unidriver sends the first character value that was entered in the edit control, and then use either a backspace character or x-movement command (as defined in the DI_BKSP_OK control) to move the current position back to the original position. Then, the Unidriver sends the second character to overprint the first. If NULL, the second character is not set. This is used to overstrike characters, such as the slash and zero to produce a slashed zero.

•	Variable-length translation. Each character code consists of a variable length string containing printer commands that change printer modes to gain access to a particular character, such as symbol set switching in the LaserJet family. The Unidriver sends the commands entered in the edit control when requested.

The differences between these formats is transparent to the user. Unitool creates the CTT in a format that results in the smallest file size depending on the actual translation. Printer commands sent from the CTT do not change the permanent state of the printer.


Minidriver Callback Functions

You can provide callback functions that the Microsoft Windows Universal Printer Driver calls at particular points in its execution. The following topics provide information on these callback functions.

  Minidriver Callback Functions

  CBFilterGraphics

  WriteSpoolBuf


CBFilterGraphics

WORD FAR PASCAL  CBFilterGraphics(LPBYTE lpdv, LPSTR lpBuf, WORD wLen)

Alters the format of raster graphic data before sending the data to the output device. This is useful if a specific device addresses pins on the print head in an unusual way (such as older Okidata dot matrix printers), or if the device requires raster graphics data in an unusual format (such as the "24 raster bits in 4 bytes" format common among Toshiba dot matrix printers).

•	Returns the number of bytes of processed raster data.The number of bytes may be the same as wLen, but not necessarily.

lpdv

Address of private data used by the Unidriver. The CBFilterGraphics function should not change this data.

lpBuf

Address of a buffer that holds raster graphic data.

wLen

Size, in bytes, of the buffer specified by lpBuf.

After CBFilterGraphics has finished changing the raster graphic data, it should call the WriteSpoolBuf function to pass the data to the Unidriver.

To implement this function, you must:

1.	Set the RES_BO_OEMGRXFILTER bit flag in fBlockOut dialog box that is accessible through the RESOLUTION dialog box.

2.	Export the CBFilterGraphics function as ordinal 300 in the EXPORTS section of the module definition (.DEF) file for your minidriver.

3.	Import the WriteSpoolBuf function as ordinal 300 in the IMPORTS section of the module definition (.DEF) file for your minidriver.

4.	In the drvname.C file for your minidriver, add the function to perform the changes upon the raster data needed by the device. Define this function as described under "WriteSpoolBuf."


WriteSpoolBuf

short FAR PASCAL WriteSpoolBuf(LPBYTE lpdv, LPSTR lpBuf, WORD wLen);

Passes data to the Unidriver that has been changed by the CBFilterGraphics callback function.

•	Returns the number of bytes written if successful, C1 otherwise.

lpdv

Address of private data used by the Unidriver. The data should be that same as that specified in the CBFilterGraphics function.

lpBuf

Address of the buffer that receives changed raster graphic data.

wLen

Size, in bytes, of the buffer specified by lpBuf.


Unitool Error Messages

  Unitool Error Messages

Unitool provides two ways of checking the data described in the minidriver for possible problems and reporting that information back to you. From the Options menu, you can choose two commands: Validate Dialog Boxes and Validate Now!.

For message descriptions, refer to:

  MiniDriver Data Dialog Box Messages

  ModelData Dialog Box Messages

  Resolution Dialog Box Messages

  Paper Sizes Dialog Box Messages

  Font Cartridge Dialog Box Messages

  Page Control Dialog Box Messages

  Cursor Movement Dialog Box Messages

  Font Simulation Dialog Box Messages

  Color Models Dialog Box Messages

  DownLoad Info Dialog Box Messages

  Printer Font Metric Dialog Box Messages

  CTT Dialog Box Messages

  General Error Messages

Validate Dialog Boxes

The Validate Dialog Boxes command may be chosen or canceled at your discretion. When it is chosen, whenever you display a dialog box and choose OK, Next, or Previous (that is, any choice that will cause the current dialog box contents to be saved rather than ignored), Unitool will perform some limited error checking on the contents of that dialog box. If any potential problems are found, a new dialog box listing all the potential problems will be displayed, and you may choose to ignore these warnings or return to the dialog box to correct them. All of the error messages, along with a corresponding explanation, are listed at the end of this appendix. If the Validate Dialog Boxes command is not chosen, error checking will not occur. This command is enabled by default.

Validate Now

The Validate Now command on the Options menu performs some limited error checking on the contents of the entire minidriver file currently loaded. If any potential problems are found, a new dialog box listing all the potential problems is displayed. All of the error messages, along with a corresponding explanation, are listed at the end of this appendix.


MiniDriver Data Dialog Box Messages

Illegal GPC Major Version Number, must be 0<=n<=1

The value in the Major box is not 0 or 1.

Illegal GPC Major Version Number, must be 0<=n<=1

The value in the Minor box is within the specified range (0 - 255).

Structure-Name Conversion error

The new master units resulted in a round-off error after each was divided into a specified member in the MODELDATA, RESOLUTION, PAPER-SIZE, PAPER-SOURCE, CURSOR-MOVEMENT, or RECTANGLE-FILL structures.

For example, if the sLeftMargin box of the ModelData dialog box contains 179, and the horizontal master unit was changed from 360 to 180, the conversion error message appears because 89.5/180 cannot be expressed as an integer. Unitool also replaces the structure identified by Structure-Name with the appropriate string.


ModelData Dialog Box Messages

Default Font ID must refer to a valid font

An invalid value is entered in the Default Font ID box.

Default CTT ID must refer to a valid CTT

The value entered in the Default CTT ID box does not identify a valid character-translation table.

Every Model must have a name

The string entered in the Name of Model box is invalid.

Look Ahead Region must be non-negative

The value entered in the LookAhead Region box is negative.

Max Page Width must be > 0 or equal -1

The value entered in the Max-Width page size limits box is equal to 0 or less than -1.

Max Page Height must be > 0 or equal -1

The value entered in the Max-Width page size limits box is equal to 0 or less than -1.

minidriver name supports Font Cartridges, but has no Cartridge slots

Zero is entered in the sCartSlots box, and one or more font cartridges is selected in the supported attributes Font Cartridges dialog box. The Font Cartridges dialog box is associated with the ModelData dialog box.

minidriver name has no PageControl

A set of supported page-control commands is not identified in the ModelData dialog box.

minidriver name has no CursorMove

A set of supported cursor-movement commands is not identified in the ModelData dialog box.

minidriver name has no Resolutions

A set of supported resolution commands is not identified in the ModelData dialog box.

minidriver name has no Paper Sizes

A set of supported paper-size commands is not identified in the ModelData dialog box.

minidriver name: Memory Values not used for non-HPPCL devices

One of the listed memory configurations in the ModelData dialog box is for a printer that does not use HPPCL.

Min Page Width must be > 0

The value entered in the Min-Width page size limits box is less than or equal to 0.

MODELDATA Min Page Height must always be > 0

The value entered in the Min-Height page size limits box is less than or equal to 0.

sCartSlots must be non-negative

The value entered in the sCartSlots box is negative.

sLeftMargin must be non-negative

The value entered in the sLeftMargin box is negative.

sMaxPhysWidth must be > 0

The value entered in the sMaxPhysWidth box is not greater than or equal to zero.


Resolution Dialog Box Messages

Every RESOLUTION must have a format string

The a format string for the selected resolution is not entered.

minidriver name Illegal Text X DPI value

An invalid horizontal text resolution is entered.

minidriver name Illegal Text Y DPI value

an invalid vertical text resolution is entered.

minidriver name Illegal Graphics X DPI value

An invalid horizontal graphics resolution is entered.

minidriver name Illegal Graphics Y DPI value

An invalid vertical graphics resolution is entered.

minidriver name: sMinBlankSkip must be >= 0

An invalid value is entered in the sMinBlankSkip box.

minidriver name :sMinBlankSkip should be > 0

An invalid value is entered in the sMinBlankSkip box and the RES_BO_ENCLOSED_BLNKS box is checked in the fBlockOut dialog box.

minidriver name: sNPins must be 1,8,16,32,40,48...

An invalid value is entered in the sNPins box.

minidriver name: sPinsPerPass must be 1,8,16,32,40,48...

An invalid value is entered in the sPinsPerPass box.

minidriver name: Spot Diameters must be > 0

A negative value is entered in the sSpotDiameter box.

minidriver name: RES_DM_GDI conflicts with sNPins or sPinsPerPass

A value greater than 1 is entered for sNPins or sPinsPerPass and the RES_DM_GDI box is checked in the fBlockOut dialog box.

minidriver name: Unknown iDitherBrush

An undefined value is entered in the iDitherBrush box.


Paper Sizes Dialog Box Messages

minidriver name :Illegal Bottom Margin

An illegal bottom-margin height is entered.

minidriver name :Illegal Left Margin

An illegal left-margin width is entered.

minidriver name :Illegal fPaperType bit(s) set

An illegal paper-type box is selected.

minidriver name :Illegal Right Margin

An illegal right-margin width is entered.

minidriver name :Illegal Top Margin

An illegal top-margin height is entered.

minidriver name :Illegal X Size

An illegal paper width is entered.

minidriver name :Illegal Y Size

An illegal paper height is entered.


Font Cartridge Dialog Box Messages

Font Cartridge Must have a Name

A string identifying the selected font cartridge is not entered.


Page Control Dialog Box Messages

minidriver name :Max Copy Count must be >= 0

A value less than zero is entered for the maximum copy count.


Cursor Movement Dialog Box Messages

minidriver name :sMult =0 or 1 for abs. Y move

The value entered in the sUnitMult box of the associated Units dialog box is not 0 or 1.

minidriver name :sMult =0 or 1 for linespacing Y move

The value entered in the sUnitMult box of the associated Units dialog box is not 0 or 1.

minidriver name :sMult =0 or 1 for rel. Y move

The value entered in the sUnitMult box of the associated Units dialog box is not 0 or 1.

minidriver name :sMult =0 or 1 for rel. up Y move

The value entered in the sUnitMult box of the associated Units dialog box is not 0 or 1.


Font Simulation Dialog Box Messages

minidriver name :sBoldExtra must be >= 0

The value entered in the sBoldExtra box is negative.

minidriver name :sBoldItalicExtra must be >= 0

The value entered in the sBoldItalicExtra box is negative.

minidriver name :sItalicExtra must be >= 0

The value entered in the sItalicExtra box is negative.


Color Models Dialog Box Messages

minidriver name :DC_EXTRACT_BLACK conflicts w/ number of planes

The selection contradicts the specified number of planes.

minidriver name :DC_PRIMARY_RGB conflicts w/ number of planes

The selection contradicts the specified number of planes.

minidriver name :sBitsPerPixel must = 1

The value entered in the sBitsPerPixel box is not equal to 1.

minidriver name :sPlanes must = 3 or 4

The value entered in the sPlanes box is not equal to 3 or 4.


DownLoad Info Dialog Box Messages

minidriver name :Bitmap Font Descriptor must be > 0

The bitmap font-descriptor value entered is negative.

minidriver name :Bitmap Char Descriptor must be > 0

The bitmap character-descriptor value entered is negative.

minidriver name :fFormat DLI_FMT_PCL not set

The DLI_FMT_PCL box is not checked for a HPPCL printer.


Printer Font Metric Dialog Box Messages

Kerning Info will be lost Continue?

Kerning information will be lost.

minidriver name :AvgWidth must be > 0

The value entered in the Average Width box is negative.

minidriver name :Ascent must be > 0

The value entered in the Ascent box is less than or equal to zero.

minidriver name :CharSet must be 0,1, or 2

The value entered in the Char Set box is not equal to 0, 1, or 2.

minidriver name :HorizRes must be > 0

The horizontal resolution value entered is less than or equal to zero.

minidriver name :Points must be > 0

The point size value entered is less than or equal to zero.

minidriver name :Type must = 128

The value in the Type box does not equal 128.

minidriver name :VertRes must be > 0

The vertical resolution value entered is less than or equal to zero.

minidriver name :Weight should be 400 or 700

The value entered in the weight box is not equal to either 400 or 700.


CTT Dialog Box Messages

Can't have LastChar < FirstChar

The specified character code for the first character is greater than the specified character code for the last character.

Must be 0 < n < 255

The specified character code is not an integer value between 1 and 255.


General Error Messages

Bad format Font file: minidriver name

The format of the specified font file is invalid.

Bad Format GPC file

A GPC file with an invalid format is requested for loading.

Bad Format RC File

The specified RC file uses an invalid format.

Can't add atom for minidriver name

The PC cannot process a string. If this error occurs, exit Unitool and Windows.

Can't change drives: minidriver name

The PC cannot switch to the specified driver.

Can't create directory:minidriver name

The PC cannot create the specified directory.

Can't Find File minidriver name

The requested file cannot be found.

Can't find minidriver name in UNITOOL.INF

The PC cannot find an entry for the specified minidriver in the UNITOOL.INF file.

Can't find string with requested ID

The GPC file contains an entry in its string table that is not present in the corresponding RC file.

Can't find UNITOOL.INF in Windows directory

The PC cannot locate the file named UNITOOL.INF.

Can't read font file: minidriver name

The specified font file cannot be read.

Can't read PFMEXTENSION, unable to access DRIVERINFO

The PFMEXTENSION structure in the PFM file cannot be parsed. (If Unitool cannot parse the PFMEXTENSION structure, Unitool cannot read the DRIVERINFO structure.)

Can't read RC File: minidriver name

The specified font file cannot be read.

Can't save CTT reference change in: minidriver name

After a reference to a CTT is changed, the font file cannot be changed.

Can't Save File minidriver name

The file cannot be saved using the specified filename.

Can't save RC File: minidriver name

The specified resource file cannot be saved.

Can't update Read Only file: minidriver name

A font file saved with read-only permission cannot be saved.

Default Font ID in: minidriver name Is no longer valid

The font file containing the minidriver default font was deleted.

Global Memory Allocation failed

The required memory cannot be allocated. If this error occurs, exit Unitool and Windows without attempting to save data.

GPC and/or RC file is read only,Save will be disabled:minidriver name

Either the specified resource file or the associated GPC file was saved with read-only permission.

Illegal CTT file entry:minidriver name

The entry for a CTT file in the specified resource file cannot be parsed.

Illegal Font file entry:minidriver name

The entry for a font file in the specified resource file cannot be parsed.

Illegal GPC file entry:minidriver name

The entry for the GPC file in the resource file cannot be parsed.

Illegal DRV name, must be between 1−8 chars

The entered minidriver name exceeds 8 characters.

Illegal string

The entered formatted string is invalid.

Illegal STRINGTABLE entry in:minidriver name

The specified resource file contains an invalid string table entry.

Must Provide a Destination Directory

The directory name (specified as part of the minidriver name) is invalid.

Newer version of Unitool needed to read this file

A newer version of Unitool must be loaded in order to edit the specified GPC file.

No errors were found

No errors were found after the Validate Now command is selected.

No structures of this type have been defined

A modification is attempted on data that in not defined.

Not a device font PFM file: minidriver name

The specified font files do not correspond to a device font.

Numeric Value required

A non-numeric value is entered instead of a numeric value.

OverWrite the file: minidriver name

An existing minidriver file is about to be overwritten.

RC file doesn't reference GPC file:minidriver name

The specified resource file does not contain a reference to the listed GPC file.

RC file lists duplicate font files

The specified resource file contains duplicate font file entries.

RC file lists duplicate CTT files

The specified resource file contains duplicate CTT entries.

RC file has non-contiguously numbered font files

The specified resource file contains noncontiguous identifiers for minidriver font files.

Requested CTT ID value already used by: minidriver name

The specified CTT identifier is already in use.

Replacement CTT ID doesn't exist

The specified replacement CTT does not exist.

Save Failed, restoring original files

The GPC file cannot be saved and the original files must be restored.

STRINGTABLE missing END statement

The specified resource file contains a string table that is missing an END statement.

Target Directory doesn't exist, Create?

The specified directory does not exist.

Unable to retrieve CTT file names, Can't save file

The specified CTT files cannot be retrieved and the corresponding resource file cannot be saved.

Unable to retrieve font file names, Can't save file

The specified font files cannot be retrieved and the corresponding resource file cannot be saved.

Unable to retrieve RC strings, Can't save file

The minidriver's resource strings cannot be retrieved and the file cannot be saved.

Unresolved STRINGTABLE reference for ID:minidriver name

The specified string-table reference cannot be resolved.


Printer Font Metric Structure

The following structure is used by all Printer Font Metrics (PFM) files used by drivers supported by the Microsoft Windows Universal Driver.

typedef struct

{

    short   sSize;

    short   iVersion;

    WORD    fCaps;

    short   iFontID;

    short   sYAdjust;

    short   sYMoved;

    short   iTransTab;

    short   sUnderlinePos;

    short   sDoubleUnderlinePos;

    short   sStrikeThruPos;

    LOCD    locdSelect;

    LOCD    locdUnSelect;

    WORD    wPrivateData;

    short   sShift;

} DRIVERINFO;

Members

sSize

Size, in bytes, of the structure.

iVersion

Version number of the structure. This documentation describes version 0x0301 (implied decimal for version 3.01).

fCaps

Bit flags describing capabilities. Currently, cCaps can only be DF_BKSP_OK to indicate that this fonts uses a CTT_WTYPE_PAIRED character-translation table to determine how to overstrike characters. If it is set, it is assumed that a single backspace character can be used to move the cursor to the start of the bounding box of the previous character prior to overstriking. If it is not set, it is assumed that explicit x-movement commands are required to position the cursor for an overstrike. If the font does not use a CTT_WTYPE_PAIRED translation table, this flag is ignored.

iFontID

Reserved; do not use.

sYAdjust

Distance to move the current y position, as expressed in master units, before printing characters in this font and size. This member is primarily used for double-height characters, and the specified distance to align the baseline accurately.

sYMoved

Distance to move the y position, as expressed in master units, after printing with this font and size. This member is also used to compensate for fonts that do not restore the cursor to the correct y position. It is primarily used for double-height characters.

iTransTab

Index of character-translation table resource for this font. This may zero, a positive, or negative number. If this is zero, use the character-translation table referred to in the ModelData dialog box for this model. If this is a negative number, the Universal Printer Driver will take the absolute value and use its own character-translation table resource with this identifier. If this is a positive value, the Universal Printer Driver will use the driver-defined character-translation table resource with this identifier value.

sUnderlinePos

Position of the hardware underline created by FS_OCD_ST_UNDERLINE_ON from the bottom of the character-bounding box. This member is measured in master units.

sDoubleUnderlinePos

Position of the hardware double underline created by FS_OCD_ST_DOUBLEUNDERLINE_ON from the bottom of the character-bounding box. This member is measured in master units.

sStrikeThruPos

Position of the hardware strikethrough created by FS_OCD_ST_STRIKETHRU from the bottom of the character-bounding box. This member is measured in master units.

locdSelect

Offset to the command descriptor to select this font.

locdUnSelect

Offset to the command descriptor to cancel the selection of this font. This member is NOOCD if not used.

wPrivateData

Private data to be used by the minidriver.

sShift

Number of pixels to shift each character to the left or right. Negative numbers shift to the right; positive numbers shift to the left.