Weasyprint: Table headers and footers are not displayed when nothing else is on the page

Created on 22 Oct 2013  路  2Comments  路  Source: Kozea/WeasyPrint

When I print following webpage, the first table (with header) is not printed, unless I remove tags. I got the error when I was trying to print irregular tables (some of the tables were connected to look like one table).

http://langust.x10.mx/test_wrongly_printed_header.html

bug

Most helpful comment

It鈥檚 fixed in branch fix_129 (surprise!), we need tests before merging.

All 2 comments

What a funny bug!

  • working: <html>text<table style="border: 2px solid"><thead><tr><th>Header
  • not working <html><table style="border: 2px solid"><thead><tr><th>Header

This is caused by this line (and the same ones in the next blocks):
https://github.com/Kozea/WeasyPrint/blob/f0da0374bf0d54deb802393f6c636adf7541f9b9/weasyprint/layout/tables.py#L281

This test asserts that if there's nothing on the page, that's because nothing can be be drawn, so the header/footer doesn't fit. But when there's nothing else to draw on the page, that's normal :).

It鈥檚 fixed in branch fix_129 (surprise!), we need tests before merging.

Was this page helpful?
0 / 5 - 0 ratings