Hi
I'm writing application that will print a lot of documents. To reduce print costs all documents will be printed on dot matrix printer. I have made few tests and print quality (on dot matrix printer) is very poor. If I set high resolution on printer (system printer settings) print quality is good but speed is very slow. On laser printer everything works fine.

I think (please correct me if I'm wrong) QPrinter class is sending data to printer as a image. I tried with different output formats: NativeFormat and PdfFormat - the same issue. When I set PostScriptFormat then printer is printing postscript text with all postscript commands.

This is my code:

Qt Code:
  1. QTextEdit editor;
  2. QPrinter printer(QPrinter::HighResolution);
  3. printer.setOutputFormat(QPrinter::NativeFormat);
  4. printer.setDuplex(QPrinter::DuplexAuto);
  5. printer.setColorMode(QPrinter::GrayScale);
  6.  
  7. QString htmlFile("<!DOCTYPE HTML><html><head><meta http-equiv='Content-Type...............");
  8.  
  9. editor.setHtml(htmlFile);
  10.  
  11. editor.print(&printer);
To copy to clipboard, switch view to plain text mode 

My question is how to print formatted text on dot matrix printer (for example html text) using qt?

PS: I have made tests on Oki microline 3320 (9-pin), panasonic kx-p1150 (9-pin), panasonic (24-pin) printer. I even tested few drivers but result is the same.