Bug 106637

Summary: page-break tags of html's gives incorrect spacings for 1st page ,compared to other pages when printed to pdf.
Product: WebKit Reporter: Indrajit <indrajit.tapadar>
Component: PrintingAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED    
Severity: Normal CC: hyatt, leonard.lee, sheeeng
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Output pdf of various browsers none

Indrajit
Reported 2013-01-11 00:30:09 PST
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' />
Attachments
Output pdf of various browsers (36.91 KB, application/zip)
2013-01-11 00:30 PST, Indrajit
no flags
Indrajit
Comment 1 2013-01-11 00:30:59 PST
Created attachment 182281 [details] Output pdf of various browsers
Note You need to log in before you can comment on or make changes to this bug.