UGNetwork Channel _ / _ User Group Library _ / _ How-To
Explanation of how to install the Generic/Text Only printer
driver within
Windows (v3.1-Win95) and how it can be useful. From the The CEBUG Swatte
Printing to a File
by Irene M. Kraus
Being able to redirect various information that would normally be displayed on your
screen to either your printer or a f ile is an old trick in DOS. I'm sure all of
us remember typing in c:>\ dir c: > prn (c:>\ dir c: > lpt1 depending
on the version of DOS you used) to print the contents of the root directory, or c:>\
dir a:*.gif > c:\temp\pics.txt to save a directory listing of just the GIF files
on a disk to a text file. These tricks were also handy at times when you needed to
redirect the output from a program that would normally send it to the printer to
a file. However, things don't work this way in Windows, so how do you print to a
straight text file?
Using the printer driver you all ready have installed on your system, and simply
redirecting it's output to go to a file doesn't work very well. All of the codes
needed to either print in graphics mode, or font information is included in the file.
Finding the actual information within the file created is difficult!
Fortunately, Microsoft had created a solution for this problem of printing to a text
file, and it's available regardless of what version of Windows you are using. The
solution is a special printer driver called, Generic/Text Only. The first thing you
will need to do is install it from your Windows installation disk(s). Open Control
Panel, Printers and either click the Add Printer button, or double-click on the Add
Printer Wizard in Win95. You should see a list of available printer drivers that
came with your version of Windows. Scroll through the list and find the Generic/Text
Only driver and click Install or Okay to add it.
You should now double-check to make sure this printer driver is setup to redirect
output to a file. How you do this is a bit different in each version of Windows,
so I'll tell you how to do this for each one. In Win 3.x (all versions), highlight
the printer driver and click on Port. Make sure it is going to FILE and click OK.
In Win95, highlight the printer icon and open the properties box.
There are many ways to do that, here are my favorite two: right-click on the icon
and choose Properties in the menu available, or highlight the icon and click the
Properties icon (the one that looks like a hand pointing at a box). Click on the
Details tab, and make sure the Print to Port is set for "FILE: (Creates a file
on disk)" and then click okay. The icon for this printer driver should also
look a bit different than your normal one in Win95. In addition to the printer icon,
there should be a red arrow pointing to what looks like a disk if you have this set
up proper.
I do not advise making this your default printer! In most cases, you can switch to
this printer driver when you need it without any need to change your default printer
settings. Okay, everybody has the driver installed; now how can you use it?
Here are some examples of when I've found this driver to be useful. In one case,
I was testing out a font management program that was printing several lines of information
at the bottom of each sample page it printed in a font size so small I couldn't read
it. So, I had it go to a file instead, and could then read the message just fine
(the e-mail address for the program author so I could complain about the program!).
If you are working with any of the many diagnostic software available, you can often
print information about your system to your printer. Some don't offer to save that
information to a file for you, so you can use the Generic/Text Only driver to send
it there yourself. Then you can pass that on to the technical support staff for a
product or hardware either in an e-mail message or in a fax message.
While this will not be something you need to do everyday, knowing you can do it when
you have to can be a life saver!
Irene M. Kraus