Generic Text Only printer driver mangles control codes

Posted by Terry on Stack Overflow See other posts from Stack Overflow or by Terry
Published on 2010-05-11T01:19:49Z Indexed on 2010/05/11 1:24 UTC
Read the original article Hit count: 397

Filed under:
|
|
|

If an escape character (or most other characters < 0x20) is sent to the generic / text only printer it gets printed as a period. Using the code in the WinDDK is it possible to 'correct' this behaviour so that it passes it through unmodified?

The general scenario for this is that some application ('user app') outputs a document to a windows printer. My application requires this data in plain text form and so what I do is run a generic / text only printer that talks to a virtual com port. This generally works fine except where the 'user app' outputs binary data to the print queue without using the correct mechanism (which seems to work fine on some printer drivers, such as the Epson POS ones, but not the generic / text only one).

I've tried changing the print processor selection without success and also tried looking at the gtt files to see if I could readily map in these characters as though they were printable, but the minidriver tool won't let me do that. Any suggestions?

© Stack Overflow or respective owner

Related posts about Windows

Related posts about printer