Customixing Microsoft's Printer Driver RRS feed

  • Question

  • Hello All,
    when we print a document, the printer mostly receives the bitmap data and then displays them. If I have a printer that expect to receive text data, that is unicode charset, is it fesible to capture the text data from the parameters of DrvTextOut function called by GDI each time and then sends those string data to the printer by calling WritePrinter function? And the printer uses the STM32 as its processor. After receiving the printing data, STM32 processor extracts the glyphs of the character from the flash and then display the character on the TFTLCD so as to simulate a real printer. In other words, when a user print a document, my printer can display the text on its LCD and I want to develop my own printer driver to obtain the text data instead of bitmap data. How to develop such a printer driver?
    Thanks a lot.
    Tuesday, May 24, 2016 8:28 AM

All replies

  • If what you need is a printer driver that takes print jobs from standard Windows programs then extracts text from those jobs, you might not have to create your own driver. One option is to use the virtual printer module that's part of LEADTOOLS Document Imaging (Disclosure: I'm a LEAD employee).

    The SDK contains a driver you can customize using different programming languages such as C#, VB.NET or C/C++.

    If the job contains text to begin with, you can simply parse the job contents and obtain the text in your program.

    If the printing application sends images of text and not actual text characters, you can perform OCR (part of LEADTOOLS Recognition Imaging) to convert the images to text.

    If you would like to try the printer driver and its SDK, there's a free evaluation edition on the website. You can find more details here:
    Thursday, April 19, 2018 6:32 PM
  • The Windows Driver Kit includes printer driver samples that show how to do that.  It's not an easy task.  It can be tricky to have a printer that renders its own characters.  Your printer driver will have to act as a font server, so that you can tell windows the exact size of all of the glyphs in the fonts and font sizes you support.  Programs like Word need to know that to do proportional layout.

    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Friday, April 20, 2018 11:13 PM