Trilobyte Software Systems

Enhancing Printer Emulation Performance

Q. Why does it take so long to print a Host Document?
A. There are many things that affect Printer Emulation Performance. They range from the performance of the host system to font selection in the Printer Emulation program to spooling within a network server. We will cover each one of these possibilities in detail, but first it would be helpful to know exactly what happens when a host document is printed. With this background we can better understand all of the components involved and in turn understand how they affect print performance.

What happens when a Host Document is printed

When a host document is generated for printing, it is first queued in the assigned host printer output queue. From there, additional formatting commands are applied by the host system as it is being spooled to the attached printer device. The data is then sent in blocks over the connection media to the receiving terminal (in our case a PC running Windows and the Printer Emulation program). There the Printer Emulation program must convert the printable data from EBCDIC to ANSI, interpret the formatting commands and generate corresponding Windows formatting commands for the selected PC printer driver. Once the Windows Printer driver has a page of data, it is then converted and interpreted from Windows formatting commands into native commands for the target PC printer. This data is then spooled on the PC's Hard Drive and a corresponding entry is added to the Print Manager. The Print Manager then waits for completion of the entire document before sending it to the target PC printer. Note that if the target PC printer is not directly attached to the host PC, but rather on a PC network, then usually this document is spooled once again on the Network Server and accumulated in its entirety before being sent to the target PC printer.

Making this mess run faster and more efficiently

The Host System

The speed at which the host system sends the block of print data depends on raw power of the host computer, the number of jobs running, the number of terminals connected, the number of concurrent users currently attached, and the host configuration of the Print spooling subsystem.. The one other factor is the speed of the connection. EtherNet is usually faster than Token Ring which is usually faster than Twinax which, in turn, is usually faster than ASYNC. And with most of these, that speed depends on the amount of "other" traffic on that line.

In general, there is not much that can been done on the host system side of things (other than upgrade the system to a more powerful box or kick everyone else off!).

The Personal Computer

A faster PC is always nice here, but not always fiscally feasible. More memory can make a big difference, especially if you only have 4MB. A bi-tronics high speed parallel card can make a night and day difference here too. If you don't have one, you could be missing out.


There are many things that can be done within Windows to expedite the printing process.

The Print Manager

First, if your Target PC printer is connected via a network, then turn off Print Manager. If you are directly connected to the Target PC printer, you can still try turning off the Print Manager, but be forewarned that this can make other Windows application appallingly slow! The "Use Print Manager" checkbox is located in the Printers Icon of the Windows Control Panel.

If you are using the Print Manager, you can increase its spooling speed (to the detriment of other Windows Program) by selecting a Higher Priority on the Print Manager's "Options" Menu.

The Printers Control Panel Icon

Second, try turning on the "Fast Printing Direct to Port" checkbox in the Connect dialog of the Printers Icon in the Windows Control Panel for that printer. Note that on some systems, this makes things even worse! So if it is on, try turning it off!

The Printer Driver

Third, get the newest Printer Driver for your Target PC Printer. The ones that came with Windows are mostly just re-hashed Windows 3.0 or 2.0 printer drivers and have not been optimized for Windows 3.1. These can normally be found on the Manufacture's BBS, CompuServe or other nationwide BBS services.

In the Printers Icon of the Windows Control Panel is the list of all the Windows Printer Drivers that have been installed and configured on your system. Here it is very important that you are using the correct Windows Printer Driver. If you are using one printer type, like a Okidata, but configured a "compatible" driver, like an IBM Proprinter driver, then you should look into getting a "real" printer driver that is made for that PC printer (Okidata to Okidata, Proprinter to Proprinter, etc.). Even though these drivers are supposed to be compatible with other manufacturer's printers, they usually lack many of the enhancements and font tables of that particular Printer. This has the effect of not giving you what you want in your printouts.

If your PC printer and Driver are of the Dot-Matrix variety, then you'll want to see if they can be set for draft mode printing. This can have dramatic effect on the print speed of your host documents. Click on the setup button for that Driver and look for a "Quality" item in that dialog. If you find one, set it to "Draft" or its equivalent. If you don't see it there, then look for an Options button and click on that and look over the dialog that it displays.

Printer Emulation

Now, for the Printer Emulation program, there are quite a few adjustments that can be made with the latest version of the Printer Emulation Program for the sake of speed. Note that all of them have drawbacks.

From the Main Window of Printer Emulation

On the main Printer Emulation Window is a scrollbar labeled "Printing Priority". This little widget controls how much time the Printer Emulation program has at a crack to process the host printing commands. Moving the thumbar to the left gives the program more time to work (to the detriment of other Windows programs) and moving it right slows it down (allowing other programs to run better). Note that if you move the thumbar all the way to the left, you'll be giving Printer Emulation essentially everything Windows and you PC has to do the work and nothing else will be able to run! Not always a good idea.

On the Advanced Options Dialog

On the Options Menu there is an item called "Advanced". If the documents are printing quickly once they get to the printer, and the print head (if it has one) just whips along, but it just takes forever to begin printing, then this is the place to look.

Seconds to Wait...

The first option "seconds to wait..." controls how long the Printer Emulation program will wait for more print data from the host before releasing it to the Windows Printer Driver. Most of the time, the Printer Emulation program can sense when a document is finished from the host, but occasionally it can't. So the program must wait a predetermined time just to be sure there is no more data. You can adjust this value, putting in smaller and smaller times to see if it helps any. Note that if the value is too small, you will get incomplete pages printed. This is because the Emulation Printer closed the document before it was really done. On a taxed host system it can take upwards of 20 seconds to send another block of print data. So be careful!

Pages Per Block

The other option, "pages per block..." is only of use if the Windows Print Manager is being used. Since the Print Manager will not print a document until it has spooled on disk in its entirety, it can take a very long time to start printing (especially if the host document is 100+ pages)! This option allows us to "fake out" the Print Manager into thinking a document is done by chopping that document into smaller sub-documents. A value of one will make each page a new document, a value of 2 groups every two pages, and so on. A value of 0 means no chopping is done. Be careful here too! The Print Manager has a fixed maximum number of documents it can spool at a time. If it reaches this limit, because the printer can't print them fast enough, then the Print Manager will start throwing the excess documents away. It will warn you but there is nothing you can do about it (nice, huh?). So, chopping a 100 page report into 1 page blocks would probably not be a good idea.

On the Page Setup Options Dialog

Now if the data gets to the printer fast enough, but the printer is slow in printing it, its probably due to all the adjustments the Printer Emulation program has to make in order for the document to as closely match what the host system wanted in the first place. Let's bring up the Page Setup dialog from the Options Menu of the Printer Emulation program and take a look at it.


First thing to do is set your Resolution to the highest DPI (Dots Per Inch) available. I know this sounds wrong, but setting it this way gives you, the user, more options and control over margins, font mapping and many other functions. If there is nothing available, just leave it as "Windows...". This means that the Windows Printer Driver won't tell the Printer Emulation Program if there are any other available resolutions, or that the Windows Printer Drivers does not support any other DPI.

Font Mapping

Font mapping can make some of the most dramatic differences yet when concerned with printing speed. The Printer Emulation program has been written to make the document look as nice as possible and to match the original host Document setup as closely as possible. But because the host system has no idea whatsoever as to the capabilities of the ultimately targeted PC printer, it can and will select formatting options and font selections that don't match at all what your PC printer can do. When you produce a report in say Microsoft Write, you can see and select the available fonts and sizes from the list presented by the program. The host system can't and won't do that. If what the host wants doesn't have a perfect match on the target PC Printer, the Printer Emulation program can't say "Sorry, try again": it has to make do with what's available and print with it. The Printer Emulation program goes to great lengths to ensure you get the best possible looking printout. Speed can suffer because of this. There is no substitute for the human brain - this is where you come in:

You can control what font, size, style, weight, and spacing the Printer Emulation program chooses when the host requests any font, a size of a font, or an exact host font. If you want to map all host font ID requests on just one PC font, then select "All Host Font ID requests" in the "Map Host Font ID" combobox, and then select the font of your choice in the "To Printer Font" combobox. You can select a group of fonts by size in the Map Host Font ID combobox by selecting that size entry, i.e. "All 10 CPI Font Requests", and then select your PC font. Or map each font independently by selecting the host font and matching it to a particular PC font.

Note that there are different type of PC Printer fonts, and they are denoted by different icons next to their name in the "To Printer Font" combobox. A red "W" denotes a Windows font. This can be used on the target printer but will probably look really bad. A gray "TT" denotes a Windows True Type font, these scale great and always look nice on a printer, but can take forever to generate and print (especially on a Dot-Matrix printer). And finally, icons that are supposed to look like a printer, are native resident printer font. These are the fastest and nicest looking fonts available. The problem is that these fonts are not always available in the needed size. If this happens, and you have not overridden the size selection through the CPI combobox, then the Printer Emulation program will "micro-justify" the font in order to get the exact spacing as requested by the host. This can really kill printing performance. So if you go to the trouble of mapping host fonts to PC printer fonts, please be sure to set the CPI as well. In addition, if the host CPI for the font is not available in the native resident PC printer font, then select the next smaller size. This will ensure that all of the data will fit on the page and nothing will be clipped. Also, stay away from the "Scale" option in the CPI and LPI combo boxes, because this causes the Printer Emulation program to scale the CPI and LPI to fit completely inside the margins. This scaling will really slow down printer performance especially on a Dot-Matrix printer.

For more information on Host Font Mapping, refer to the Printer Emulation on-line Help or the user's manual that came with the product.

Whew! I had no Idea!

This pretty much covers all that is involved in printing a host document. As you can see, because features between the host system and the PC printer rarely match, decisions must be made and sacrifices taken in order to produce the best correspondence between what the host system asked for and what the PC printer can print. A major decision affecting the design of the Printer Emulation program was to produce, as acuratly as possible, the printed document as defined by the host system - even at the expense of speed - but to allow users to override this feature if they wish. We feel we made the right decisions, and we hope you will agree.