Hi All,
I'm trying to print in linux(Ubuntu 9.10) using this code:
QPrinterInfo printerInfo = QPrinterInfo::defaultPrinter();
printer.setPrinterName(printerInfo.printerName());
tedprint.setText("Test Print Test Print Test Print");
tedprint.setDocumentTitle ("Printing Sample");
tedprint.print(&printer);
QTextEdit tedprint;
QPrinter printer;
QPrinterInfo printerInfo = QPrinterInfo::defaultPrinter();
printer.setPrinterName(printerInfo.printerName());
tedprint.setText("Test Print Test Print Test Print");
tedprint.setDocumentTitle ("Printing Sample");
tedprint.print(&printer);
To copy to clipboard, switch view to plain text mode
but it failed to print. I get the warning:
lp: Unsupported format 'application/postscript'!
lp: Unsupported format 'application/postscript'!
To copy to clipboard, switch view to plain text mode
but when i try to print in terminal, lp print.txt, it prints well. How can I fix this? thanks
Bookmarks