Skip to content

Paginated tables that start at top of page have incorrect header layout #202

@jesselong

Description

@jesselong
<html>
<head>
<style>
table {
    -fs-table-paginate: paginate;
//        page-break-inside: avoid;
}
th, td {
    border: 1px solid black;
}
</style>
</head>
<body>
<h1>Table test</h1>

<div>Hello1</div>
<div>Hello2</div>
<div>Hello3</div>
<div>Hello5</div>
<div>Hello6</div>
<div>Hello7</div>
<div>Hello8</div>
<div>Hello9</div>
<div>Hello10</div>
<div>Hello11</div>
<div>Hello12</div>
<div>Hello13</div>
<div>Hello14</div>
<div>Hello15</div>
<div>Hello16</div>
<div>Hello17</div>
<div>Hello18</div>
<div>Hello19</div>
<div>Hello20</div>
<div>Hello21</div>
<div>Hello22</div>
<div>Hello23</div>
<div>Hello24</div>
<div>Hello25</div>
<div>Hello26</div>
<div>Hello27</div>
<div>Hello28</div>
<div>Hello29</div>
<div>Hello30</div>
<div>Hello31</div>
<div>Hello32</div>
<div>Hello33</div>
<div>Hello34</div>
<div>Hello35</div>
<div>Hello36</div>
<div>Hello37</div>
<div>Hello38</div>
<div>Hello39</div>
<div>Hello40</div>
<div>Hello41</div>
<div>Hello42</div>
<div>Hello43</div>
<div>Hello44</div>
<div>Hello45</div>
<div>Hello46</div>
<div>Hello47</div>
<div>Hello48</div>
<div>Hello49</div>
<div>Hello50</div>
<div>Hello51</div>
<div>Hello52</div>
<div>Hello53</div>
<div>Hello54</div>

<table>
    <thead>
        <tr><th>HA</th><th>HB</th></tr>
    </thead>
    <tbody>
        <tr><td>a</td><td>b</td></tr>
        <tr><td>a</td><td>b</td></tr>
    </tbody>
</table>

</body>
</html>

At least on my machine, that puts the table on a new page, but the first td's have too much space above them, like padding in the td. If you add page-break-inside: avoid to the table style in the head section, then the error is slightly different.

I think the problem has something to do with rendering both the original th and the paginate one.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions