Bug 36822 - [Qt] Printing a page that has a background to PDF will generate a white zone at the bottom of the page.
Summary: [Qt] Printing a page that has a background to PDF will generate a white zone ...
Status: RESOLVED DUPLICATE of bug 5097
Alias: None
Product: WebKit
Classification: Unclassified
Component: Printing (show other bugs)
Version: 420+
Hardware: All All
: P3 Normal
Assignee: Diego Gonzalez
Keywords: Qt, QtTriaged
Depends on:
Reported: 2010-03-30 07:06 PDT by qt-info
Modified: 2011-06-01 07:46 PDT (History)
10 users (show)

See Also:

Shows this issue. (232.99 KB, application/pdf)
2010-03-30 07:06 PDT, qt-info
no flags Details
Patch (2.01 KB, patch)
2010-11-22 12:19 PST, Diego Gonzalez
no flags Details | Formatted Diff | Diff
New output after patch (338.19 KB, application/pdf)
2010-11-22 12:21 PST, Diego Gonzalez
no flags Details
Patch v2 (2.20 KB, patch)
2010-11-30 04:04 PST, Diego Gonzalez
no flags Details | Formatted Diff | Diff
output after patch v2 (243.07 KB, application/pdf)
2010-11-30 04:05 PST, Diego Gonzalez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description qt-info 2010-03-30 07:06:38 PDT
Created attachment 52033 [details]
Shows this issue.

When some pages are printed to PDF using Webkit there is a white zone at the bottom of the page that is not printed. 

This can be seen by using the Qt Demo browser and the following steps.

    * Go to a website that has a background ( for example www.bluesnews.com )

    * Use print preview

    * Set all the margins to zero

At the bottom of some of the pages you will see a white area. 

It looks like this occur when the last line has a picture or text that is to large to fit at the edge of the page so that it has to be moved to the next page. 
But sometimes it even break the page incorrectly so that half the text is on one page and the rest on the next.
Comment 1 Jesus Sanchez-Palencia 2010-05-12 08:06:06 PDT
Reproduced on Snow Leopard with Qt 4.7 trunk (HEAD 03f8f1df0d88f5ffe0b3120cffce614cbeefdb70) and WebKit trunk (r59155).
Comment 2 Diego Gonzalez 2010-11-19 06:07:15 PST
This bugs seems related with https://bugs.webkit.org/show_bug.cgi?id=48523.
I will investigate more to find possible solutions
Comment 3 Diego Gonzalez 2010-11-22 12:19:57 PST
Created attachment 74583 [details]
Comment 4 Diego Gonzalez 2010-11-22 12:21:49 PST
Created attachment 74584 [details]
New output after patch
Comment 5 Antonio Gomes 2010-11-22 12:30:10 PST
Comment on attachment 74583 [details]

Is it not testable?
Comment 6 Diego Gonzalez 2010-11-22 12:39:46 PST
(In reply to comment #5)
> (From update of attachment 74583 [details])
> Is it not testable?

You mean if there is some related test to it? I don't think so. It's a user reported bug.
Comment 7 Diego Gonzalez 2010-11-30 04:04:34 PST
Created attachment 75122 [details]
Patch v2

Adjust page layout using forceLayoutForPagination to get better page view when it is paginated.
Comment 8 Diego Gonzalez 2010-11-30 04:05:51 PST
Created attachment 75123 [details]
output after patch v2
Comment 9 Diego Gonzalez 2010-11-30 11:55:36 PST
(In reply to comment #8)
> Created an attachment (id=75123) [details]
> output after patch v2

Create a autotest for it, being complicated because it is a visual bug. A way to compare if the document generated is same as required is generating a hash for both documents. The problem is there are some aspects like, date creation and specific platform informations which could generate other hash value.
Comment 10 Eric Seidel (no email) 2010-12-03 10:46:28 PST
I remember some folks in Google's Japan office were working on @page/printing for a while.  Maybe there is new testing support there that I'm not aware of.
Comment 11 Luiz Agostini 2011-05-17 14:34:29 PDT
what is the status of this bug?
Comment 12 Diego Gonzalez 2011-05-19 06:14:33 PDT
Luiz, it seems not reproducible anymore. I will check better later.

(In reply to comment #11)
> what is the status of this bug?
Comment 13 Diego Gonzalez 2011-06-01 07:46:02 PDT
The blank area is not reprocible, and page break error is related to page-break support

*** This bug has been marked as a duplicate of bug 5097 ***