Forum OpenACS Q&A: Re: Printing with printer control fonts from HTML

Collapse
Posted by David Siktberg on
Took a detailed look at the manual and at your five-byte file.  Cannot reconcile the five-byte file to the manual - the manual does not describe how the printer works (what characters produce what effects), but rather how the driver works.  Can you get a printer manual?  Anyway, it contains "Esc F 00H DC3 EOF".  DC3 has a standard ASCII "meaning" of Device Control 3 (look at ASCII values at http://www.asciitable.com), so perhaps that is what causes the drawer to open.  It's wierd that there is no "A" in there - probably means that control font sends out these characters when it encounters the letter A - i.e. the printer does not have a control font embedded in it.  Brick wall here unless you get something that describes how the printer responds to characters sent to it.  Probably not useful anyway because you cannot embed an Esc into your html.

The manual revealed more info on a closer reading.  The special characters 81H etc. appear not to work if you choose a "xxx cpi" font (see Sheet 17).  There are two native printer fonts (Printer Font Small and Large) (Sheet 11) that should let 83H through.  So try putting into your html something like <span style='font-family:Printer Font Small'>&#131;</span> and see if that works.

You might also poke into the printer driver files to learn how they control the printer, which might give you some insights.  I found the printer driver files on my Windows 2000 under \WINNT\system32\spool\drivers\w32x86\*.  The *.gpd files are text files that control printer functions other than fonts - explore those.  Your drivers are probably named Tm* (Sheet 22).

Good luck!

Collapse
Posted by Brian Fenton on
David,
I've decided not to put any more time into this problem. The work-around will have to do. Many, many thanks for all your time and efforts. I hope I can re-pay the favour some time.

Brian