Closed Bug 1846926 Opened 2 years ago Closed 2 years ago

Full height table goes onto second page when printing landscape

Categories

(Core :: Printing: Output, defect)

Firefox 118
defect

Tracking

()

RESOLVED DUPLICATE of bug 1835108

People

(Reporter: jeremy.leland, Unassigned)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

  1. Open page with below HTML, which contains a table with height: 100vh and page settings for A4 landscape.
  2. Open print dialog (Ctrl + P)
<html>
<head>
  <style>
    .main { height: 100vh; }
    td { border: 10px solid black; }
    html, body { margin: 0; padding: 0; }

    /* ISO Paper Size */
    @page {
      size: A4 landscape;
    }

  </style>
</head>

<body>
  <div>
    <table class='main' width="100px">
      <tr>
        <td style="vertical-align: top">
          Top
        </td>
      </tr>
      <tr>
        <td style="vertical-align: middle">
          Middle
        </td>
      </tr>
      <tr>
        <td style="vertical-align: bottom">
          Bottom
        </td>
      </tr>
    </table>
  </div>
</body>
</html>

Actual results:

The table goes off the first page and onto the second page (see screenshot).

Expected results:

The table should take up the full height of one page, but no more (see comparison to Chrome in screenshot).

Attached file print_table.html

Now that I'm looking at A4 portrait, I think the size is wrong here, too. It's subtle, but it looks like there's more space below the table than above it.

Component: Untriaged → Printing: Output
Product: Firefox → Core

Thanks for the bug report! This is tracked in bug 1835108, I think.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1835108
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: