Bug 36822

Summary: [Qt] Printing a page that has a background to PDF will generate a white zone at the bottom of the page.
Product: WebKit Reporter: qt-info
Component: PrintingAssignee: Diego Gonzalez <diegohcg>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: ademar, diegohcg, eric, hausmann, jesus, kenneth, kling, luiz, tkent, tonikitoo
Priority: P3 Keywords: Qt, QtTriaged
Version: 420+   
Hardware: All   
OS: All   
Attachments:
Description Flags
Shows this issue.
none
Patch
none
New output after patch
none
Patch v2
none
output after patch v2 none

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]
Patch
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]
Patch

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 ***