[Qt-interest] Printing through QWebView

Boro Andonovski spam.vnuce at gmail.com
Wed Apr 7 15:24:18 CEST 2010


Hi there, 
first mail, so be gentle :)

I'm trying to print a generated HTML document and on first try it works great. But, only on the first try. When I try to print for the second time, the print job isn't even sent to the spool queue.
Anyone else has had similar trouble? 
Here's an exempt of the code I'm using...

_ui.web_view->load(_tmp_url);
QPrinter printer(QPrinterInfo::defaultPrinter());        
printer.setCreator("Foo Bar");
printer.setDocName("Foo Bar");
printer.setNumCopies(_ui.spin_copies->value());
_ui.web_view->print(&printer);

I repeat, this only happens on tries after the first one (i.e. second, third). The first time works perfectly.
It is certain that number of copies is not 0 and the default printer isn't NULL and is valid (printer.isValid() == TRUE).
Another detail I just noticed... When set to output to PDF instead of to printer it works OK. It only happens when the output is to printer. It happens on Mac OS, Linux and Windows.

Regards,
Vnuce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100407/45b2a4ce/attachment.html 


More information about the Qt-interest-old mailing list