GDI Printing

Top  Previous  Next

GDI Printing allows host applications extensive control over the formatting of data to be sent to a Windows printer. Using the GDI Printing feature in ZTERM 2000 is compatible across all Windows printers, allowing the developer to design fancy reports and have them print on just about any printer hooked up to the PC.

GDI Printing is very similar to printer passthrough mode - where the host system sends a special sequence that then re-directs all output to an attached printer. If the GDI Printing engine is selected, data will be printed in the Courier New font at 11 point and positioning information like carriage-returns, line-feeds and form-feeds will be honored.

By itself, GDI Printing is the only way that the host can print to some of the more modern printers, specifically so-called "Windows Printers" or "GDI Printers". These types of printers rely on Windows to do all the processing work required for printing, such as rasterizing fonts. These printers cannot be used with normal passthrough mode because they lack on the on-printer resources to print unformatted text - needless to say, they also can't be used with DOS applications. However, they are very popular because they are very inexpensive.

In addition to to the rather mundane "dot-matrix emulation" that ZTERM 2000 uses when printing in GDI mode, it also supports an extensive list of escape sequences that can be embedded into the printed output to control positioning, font size and so on. Because Windows is responsible for the actual printing process, you can be ensured that one report looks the same regardless of the printer.

Note: For an example GDI Printing application written in AlphaBASIC, take a look at GDI.BAS in the folder where ZTERM 2000 was installed.