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:
printer.
setOutputFormat(QPrinter::NativeFormat);
printer.
setDuplex(QPrinter::DuplexAuto);
printer.
setColorMode(QPrinter::GrayScale);
QString htmlFile
("<!DOCTYPE HTML><html><head><meta http-equiv='Content-Type...............");
editor.setHtml(htmlFile);
editor.print(&printer);
QTextEdit editor;
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::NativeFormat);
printer.setDuplex(QPrinter::DuplexAuto);
printer.setColorMode(QPrinter::GrayScale);
QString htmlFile("<!DOCTYPE HTML><html><head><meta http-equiv='Content-Type...............");
editor.setHtml(htmlFile);
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.
Bookmarks