[Webkit-unassigned] [Bug 26584] [Qt] Printing extra information
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Aug 8 10:59:44 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=26584
--- Comment #10 from Jakob Truelsen <antialize at gmail.com> 2009-08-08 10:59:44 PDT ---
There are a lot of problems with the solution that you propose, some of which I
stated before, but let me state them again.
1) When printing with "render", it will use the display render tree. And not a
new render tree produces under print media-type.. Thus what is rendered is not
what should be printed.. This could be fixed by allowing one to switch the
media-type but that would again require changes to the API.
2) When printing to a QImage you get a pixmap, and not a vector format.
Rendering the QImage to a pdf document will not magicly convert it back into a
vector format.
3) Printing the whole thing as one long image and splitting it up is a very
hard thing to do. It is not mearly a case of splitting up an image into some
rectangels. You need to splite above or below a line of text. You cannot
split in nodes that have style="page-break-inside:avoid". If something can
almost fit on one page you scale it down and so on and so fourth. WebKit has a
nice piece of code that does this for you.
In all the solution proposed by Mr. Trent is not acceptable.
I seek to be able to do the following:
1) Count the number of pages that is going to be printed, I feel that this is
something others might also need (and not some crasy feature that only I need)
2) To be able to insert stuff into each page printed. Again I feel that this
this is a general feature that others might need. This is actually possible
today, by an ugly hack. That goes as follows. Create a subclass of QPrinter
exposing the setEngines method. Create a normal QPrinter instance, then create
a instance of the subclass then setEngines, with the engines from the first
instance, only the QPrintEngine instance must be wrapped in a class doing
something more on the new page virtual method.
3) Allow a supplied painter to be used (so that one can print more then one
document into a single print job). Arguable this is not a feature that alot of
others would need, but it does not change the fact that I do.
I would like to know how an api that *could* be used to do one ore more of the
above could look like, so that it might be merged?
--
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