GPD Creation for Unidrv 5
Updated: December 4, 2001
Generic Printer Description
A Generic Printer Description (GPD) file is a text-based file used to describe a printer for printing from the Microsoft Windows 2000 and Windows XP operating systems using the Universal Printer Driver (Unidrv). It contains information about the printer features that Unidrv will present in the user interface to allow the user to configure the printer.
A GPD also contains the printer commands and attributes that enable Unidrv to generate the correct printer-ready output data when the user prints from a Windows-based application. Creating a Windows 2000 printer driver can be as simple as creating a GPD file if there is no custom functionality beyond what Unidrv provides.
GPD provides more flexibility than previous methods in describing printer-specific features, installable options, constraints, dependency, and command ordering. In addition, text-based data files are much easier to maintain and track than binary data files.
Print drivers developed with this new technology will benefit from its advanced architecture by supplying improved color printing, support for OEM customization, and an overall speed increase.
This article provides a brief overview of the Unidrv architecture and associated tools.
Important:
-
Developers should take advantage of the minidriver development tool and convert existing GPD-based minidrivers into GPD-based drivers. IHVs who are considering monolithic drivers are encouraged to leverage GPD-based solutions when possible.
-
Unidrv 5 is extensively documented in the current version of the Windows DDK.
Unidrv Capabilities
Unidrv provides the following capabilities:
-
Support for all non-PostScript printers using printer-specific Unidrv minidrivers that describe each printer's characteristics.
-
A property sheet, based on the TreeView control, that is consistent for all printers but is also modifiable for each printer's unique options.
-
A single kernel-mode Unidrv that, along with the graphics device interface (GDI) graphics engine, converts Win32 GDI calls from applications into printer commands that can be sent to the print spooler.
Microsoft Minidriver Development Tool
The Microsoft Minidriver Development Tool (Microsoft MDT) is a software tool provided with the Windows DDK. This tool is designed for easy development of Unidrv minidrivers. Microsoft MDT provides the following features:
-
GPD Editor--a syntax-checking text editor for creating the GPD files that make up Unidrv minidrivers.
-
Unidrv Font Metrics (UFM) Editor--a property sheet-based editor that generates Unidrv font metrics files.
-
Glyph Translation Table (GTT) Editor--a property sheet-based editor that generates glyph translation table files.
-
Minidriver Workspace Editor--a tool that creates a window-based editing workspace for a Unidrv minidriver, providing access to the minidriver's GPD file, resource file, UFM file, and GTT file.
-
Minidriver Conversion Wizard--a wizard that automatically converts existing minidriver files to versions that can be used with Windows 2000 Unidrv. The following table lists the files that can be converted.
|
Input files
|
File Contents
|
Output Files
|
|
Windows NT 4.0 GPC files
|
Printer capability descriptions
|
Windows 2000 GPD files
|
|
Windows NT 3.51 GPC files
Windows 95 GPC files
|
|
|
|
Windows PFM files
|
Font descriptions
|
Windows 2000 UFM files
|
|
Windows CTT files
|
Glyph translations
|
Windows 2000 GTT files or Windows NT 4.0 RLE files
|
For more information, see the Windows DDK.