Qt WebKit Shrink Factor

When printing from WebKit, it seems that the output compression ratio is automatically imposed. Is there a way to disable pruning when printing, preferably without changing the source of WebKit?
I think this is possible using the Qt 4.6 trunk and using setFixedLayout with a higher height to trick WebKit to not shrink, but I haven't tried it yet. Maybe there is a way to get basic WebKit so that I can do this?

EDIT: Chrome works with this by expanding the height of the print layout. A.
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/print_web_view_helper.cc?view=markup

+4
source share
1 answer

This is not possible with QT 4.5 since I came across this question a couple of months ago. However, I am not talking about Qt 4.6.

The applicant is located in src / 3rdparty / webkit / WebCore / page / PrintContext.cpp on lines 115 and 126. As you can see, the shrinkage coefficient is not even constant, but is calculated so that the content is best suited for the available printable area. A.

Setting both constants to control the acceptable shrink range ( PrintingMinimumShrinkFactor and PrintingMaximumShrinkFactor ) to 1 solves the problem. I very carefully analyzed the problem and I did not find a better solution than fixing Qt.

+4
source

All Articles