Handling of TFOOT tag is incorrect
Original author: eclecticgeek (May 29, 2009 17:59:28)
What steps will reproduce the problem?
- Create an HTML document that contains a table with THEAD, TBODY, and TFOOT sections. The table should span two pages in the rendered PDF.
- Render the document with DOMPDF.
What is the expected output?
The PDF should contain a table that spans two pages. The THEAD and TFOOT should bookend the table on each page on which it appears.
What do you see instead?
The THEAD renders as expected, but the TFOOT is rendered as if it were a normal table row.
Additional information:
The TFOOT grouping should appear before the TBODY grouping in the HTML code as per the W3C specification: http://www.w3.org/TR/html4/struct/tables.html#h-11.2.3
We may wish to consider allowing the TFOOT grouping to be placed at the end of the table code since this is a likely scenario.
Original issue: http://code.google.com/p/dompdf/issues/detail?id=18
From ryan.mas on July 28, 2011 21:38:50 I've gotten a lot of email requests for this. We may want to make this a priority. Has anyone looked into it yet?
From fabien.menager on July 31, 2011 13:35:07 Nope, we didn't work on it, we try to resolve page break issues in tables for now.
Thinking about this again after a post on the forum. The question of TFOOT support presents a particularly problematic issue where we have to back up from the bottom of the page when a footer is present. Not entirely impossible to address, perhaps the easiest method would be to "shorten" the available height when we're inside a table with a footer.
So, to not open new issue about this very same problem i experience, just wanted to ask if anything is changed so far.
No updates on this issue.
So, just to clarify, if I want a header and footer that show up on every page, and I want to use HTML+CSS to do that, I need to use the method laid out here: http://stackoverflow.com/questions/7484318/header-in-pdf-page-using-dompdf-in-php ... as opposed to table headers and footers, correct?
Hello Just for information, on dompdf 0.8.2, tfoot is working well but must be placed at the end of the table :
<table>
<thead> ... </thead>
<tbody> ... </tbody>
<tfoot> ... </tfoot>
</table>
@akiuni not working for me even if tfoot placed after tbody for both php 5.6 anf 7.2
Any news for this issue?
Found the same behavior here, thead repeats on every page but tfoot doesn't. I'm using a fixed div at the bottom of the page as a workaround.
Apparently the issue is in vendor\dompdf\dompdf\src\FrameDecorator\Table.php in method split() where $this->_footers is not being used.
@andrefedalto I have a table who break if
Any news?
nothing yet