PROBLEM OF SENDING ESCAPE SEQUENCES FROM WINDOWS PACKAGES TO PRINTERS
This document outlines a problem I have been having with sending escape sequences from any
Windows package to a HP LaserJet III printer.
The problem arose when we began to replace HP Terminals with 386 PC's running Windows with
Terminal Emulators. Previous to this we were running an Outpatient Booking System written in a
4GL language on a HP3000 main-frame, with slaved HP LaserJets connected to Terminals. The
various reports slaved to the Printer used the Printers features by directly sending escape
sequences to the printer. For example, the report would send the sequence E&l1O which
would set the printer into Landscape orientation, where E is the escape character. This method has
worked fine for the past 2 years, until we replaced the terminals with Windows emulation packages.
Now the escape sequence, when sent to the printer, is not recognised as the Landscape setup
string, and the following is actually printed B&l1O where B is actually a black and white
chequered block. If the same report is sent to a spooled LaserJet it works fine, as the report is sent
directly from the HP3000 to the Printer, not via a Windows Terminal Emulation package.
This was tested futher by creating an ASCII file (with an escape sequence in it) on the HP3000, and
downloading it to the PC. If this file is printed from the DOS prompt it works, but when printed
through any Windows package the sequence is not recognised.
The printer driver being used is called HPPCL5A.DRV, and we have tried HPPCL.DRV. I have been
told why this problem exists. It is because the characters sent by any Windows package are device
independent. That is, no matter was printer is currently active under Windows, the Windows
package will send the same file to the Printer driver, which will interpret the required printer setup,
and send the appropriate sequence to the currently active Printer.
But knowing why this doesn't work doesn't help me. What language do these printer drivers
understand and how do I communicate with them?
The complete Hospital computing strategy rests on the solution to this problem, as within a few
years it is planned to replace all terminals with PC workstations running Windows.
If anybody has a solution to this problem please contact me soon!!!
Thanks in advance to all of you!
c:\peter\opb\slave.doc