Bug 61271 - [Qt] [Regression] printing to a printer produces only blank pages
Summary: [Qt] [Regression] printing to a printer produces only blank pages
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P1 Critical
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2011-05-23 04:50 PDT by Timo Schlüßler
Modified: 2014-01-28 20:27 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Schlüßler 2011-05-23 04:50:33 PDT
When printing to a printer via QWebFrame::print(QPrinter *) the printer just prints blank white pages. When printing to a file (ps or pdf), everything gets printed fine.

Testcase:
int main(int argc, char *argv)
{
   QApplication app(argc, argv);
   QWebPage page;
   QWebFrame *frame = page.mainFrame();
   frame->setHtml("<html><body><p>test</p></body></html>");
   QPrinter printer;
   frame->print(&printer);
}
Printing anything else works very well, so that's the reason for me posting the bug here but not on qt's bugtracker.

The bug is known to exist in Qt 4.7.2/3 but in 4.7.0 it worked.
Comment 1 Benjamin Poulain 2011-05-24 05:01:01 PDT
I just tried with QtWebKit 2.2 on Mac and printing works fine here.

I don't have a windows box to test.

Could you please:
-test spinning the even loop. I doubt we really support ending the application without any further event handler.
-Try with QtWebKit 2.2

Raising as P1 (regression) until someone test 2.2 on windows.
Comment 2 Timo Schlüßler 2011-05-24 08:52:53 PDT
Adding "return app.exec();" doesn't change the print-output in any way.
Using a freshly compiled QtWebKit (I used tag qtwebkit-2.2-week20 from gitorious.org/webkit/qtwebkit) doesn't change anything as well.
Comment 3 Alexis Menard (darktears) 2011-05-27 04:12:22 PDT
(In reply to comment #2)
> Adding "return app.exec();" doesn't change the print-output in any way.
> Using a freshly compiled QtWebKit (I used tag qtwebkit-2.2-week20 from gitorious.org/webkit/qtwebkit) doesn't change anything as well.

May be a bug in Qt then? Because between Qt 4.7.0 and Qt 4.7.3 I doubt WebKit in Qt changed at all.
Comment 4 Timo Schlüßler 2011-05-29 05:37:30 PDT
Okay, I will report it as a bug to Qt then.