Using the Microsoft Generic Text Only printer driver

Included with the normal printer drivers in Windows is a special type of driver called a "Generic Text Only Driver" which isn't for any specific model of printer but instead allows you to output plain text files or even enter your own printer control codes. There are a number of reasons you may want to use this driver instead of more typical printer driver:

Impact printers are generally much faster when you use this driver. Most drivers for traditional impact printers create the output as a raster image telling the printer which dots to print where. Most of the time this results in poor quality output and very slow printing. Switching to the generic driver will speed up the printing considerably and can even improve output quality.

If you have an old printer without any driver support in the current versions of Windows you can often get some output using the Generic Text driver. Usually you will need a little information onpthe printer escape sequences and you will be limited to fixed pitch fonts but it is an alternative to dumping that old hardware.

As the output from the Generic Text driver is a raw text file you could use this driver to extract information from an application which doesn't ordinarily let you. You may for instance print a statement and then run the output through a filter such as Parse Rat to extract the statement content.

During the rest of this article I will show you how to configure the Generic Text driver in Windows XP, the procedure is similar for earlier versions of Windows. We will start by installing the Generic Text driver using the normal "Add Printer" wizard in Windows, select Generic in the list of manufacturers and "Generic / Text Only" in the list of printers. Note for Windows 95/98/Me the manufacturer should be Microsoft.

Generic Text Only Driver Selection

We now need to move on to configuring the driver for you specific printer or application, start by right clicking on the printer in the printers folder and selecting "Printer Properties." The first choice you have to make is what sort of paper feed you are using, this table shows the three options in the Device Settings tab:

Cont feed no breakSelect this if you are using continuous or music rule paper and need to print right to the perforation
Cut sheetSelect this if you want a Form Feed character added after every page, usually this is the option you would use for a laser or ink jet printer.
Cont feed with breakSelect this if you are using continuous or music rule paper and need a gap either side of the perforation

The next tab in the printer properties allows you to setup a hand full of printer escape sequences, to configure this you will need some information from the manufacturer of your printer on the printers language. For this example I have just entered some simple Hewlett Packard laser printer commands to select landscape at the start of the job and to reset the printer at the end. Usually printer commands start with an escape character, you can enter this character using the sequence <1B> instead.

Printer Escape Codes Dialog

Finally the "Font Selection" tab allows you to enter the sequences to select the various font widths available and the character set. As you do not have the facility to enter font widths the only choices available to you when using this driver are fixed pitch fonts.

One issue you need to be wary of is wrapping of text, by default you will have a paper size of Letter or A4 which will wrap the text automatically after approximately 80 characters. If you need to support a full 132 column width then you need to change the paper size in the printing preferences to "US Std Fanfold" and leave the orientation on portrait which is wide paper in this case.