[Webkit-unassigned] [Bug 106637] New: page-break tags of html's gives incorrect spacings for 1st page , compared to other pages when printed to pdf.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 11 00:28:17 PST 2013


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

           Summary: page-break tags of html's gives incorrect spacings for
                    1st page ,compared to other pages when printed to pdf.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: indrajit.tapadar at digia.com


The sample Html is as below,

<html>
    <h2>Test 1</h2>
    <p style='page-break-before:always' />
    <h2>Test 2</h2>
    <p style='page-break-before:always' />
  </body>
</html>


This html when printed into pdf using Qt libraries, native Firefox, chrome browsers gives incorrect layouts for 1st and 2nd page.
The first page has more spacing in the beginning compared to following pages.

Attached are the resultant pdf using Qt5, Firefox, Opera and Chrome 

The workaround for this is adding ,margin-top tag as below.

<body style="margin-top:-3px;">
<h2>Test 1</h2>
<p style='page-break-before:always' />

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