0

I'm using SEJDA API with PHP to convert HTML to PDF. In this HTML, I have multiple tables with a variable number of rows, and each of them have a variable height, with a variable number of columns, etc.

Sometimes one (or more) table is long enough to be displayed on more than one page, so I can have a page with only rows of tbody but no thead "labels" to tell what each columns can represents.

Is there a proper way to force the thead to be shown on each page where the table is displayed ? The "css position:fixed" solution is not a good way because there is potentially more than one table and not all pages have a table on it.

Vae
  • 636
  • 1
  • 8
  • 16

1 Answers1

0

Add this to your print styles:

thead {display: table-header-group;}

If your still having issues, try https://docamatic.com. There is a dynamic table template (JSON to PDF).

drs
  • 1,165
  • 3
  • 13
  • 19