[Webkit-unassigned] [Bug 26584] [Qt] Printing extra information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 3 12:01:38 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26584





--- Comment #17 from Jakob Truelsen <antialize at gmail.com>  2009-09-03 12:01:38 PDT ---
I totally agree with the push strategy. However the solution you suggest have
some draw backs as you say: One cannot do multiple prints on the same frame,
one cannot print multiple frames into the same document (Or any other stuff for
that matter).  I think that it would be cleener to make a seperate class for
printing webpages,  QWebPrinter or whatever.  

Then one could do something like the following:

QWebPrinter p(myPrinter)
p.begin(myFrame)
for(int i=0; i < p.currentFramePageCount(); ++i)
  p->spoolPage(i);
p.end();

The QWebPrinter class could then have the following methods

::QWebPrinter 
   construct the QPainter and set up stuff
::begin()  
   Setup a frame for printing, construct the print context, compute pages rects
and so on
::end()  
  Release the print context
::spoolPage
  Print a given page for the current frame
::currentFramePageCount 
  Return the number of pages for the current fram
::painter
  Return the current painter
::printer
  Return the current printer

Then QWebFrame print method could then be reduced to creating a QWebPrinter and
calling spool page on it

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list