New issue
Advanced search Search tips

Issue 794127 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

2 pages are printed instead 1

Reported by pavel.m...@gmail.com, Dec 12 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
1. Open the attached HTML in Chromium
2. CTRL+P
3. See that 2 pages are going to print and text "top block" is twice

What is the expected behavior?
Only 1 page should be printed because browser shows just 1  page and text "top block" only once.

What went wrong?
This is the minimal HTML example:

<!DOCTYPE html>
<html lang="en">
  <head>
    <style>
      html,body{
      height:100%
      }

      #topblock {
      position: fixed;
      }
    </style>
  </head>

  <body>
      <div id="topblock">
        top block
      </div>
      <div style="margin-top: 35px;">
        body
      </div>
  </body>
</html>

Did this work before? N/A 

Chrome version: 62.0.3202.94  Channel: stable
OS Version: 
Flash Version: 

Removing anything from used styles makes page print correctly.
 
wrong_page.html
319 bytes View Download
Labels: Needs-Triage-M62
Cc: thestig@chromium.org
Components: Internals>Printing
Components: Blink>Layout
Thanks for the minimal test case. Blink folks who actually understand HTML+CSS layout should take a look.

Comment 4 by e...@chromium.org, Dec 13 2017

Cc: mstensho@chromium.org
Status: Available (was: Unconfirmed)
+mstensho, our resident pagination expert.
Status: WontFix (was: Available)
You get two pages because body height is 100% of the initial containing block, plus top and bottom margins. I get two pages in print preview.

The fixed-positioned #topblock is printed on every page, as per spec: 
https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#propdef-position
"In the case of the print media type, the box is rendered on every page [...]"
I see. Thank you for your explanation.

Sign in to add a comment