Okey, the direct answer is that you cannot do it however you want.
Edit: oh, it seems I am responsible for a more complex question, for example, “how to add a table title to each printed page”, but in any case, the solution is the same. I hope everything is in order.
But there are a few tricks to do what you want.
1) Break the table in several parts, add a part to each of them and delete the field so that it will look like one table. Add in css something like:
table { page-break-inside: avoid; page-break-after: auto; } table + table thead { display: none; }
Also do not forget to set the width td, lead tables without hell can have different widths.
After that add print styles:
@media print { table + table thead { display: table-column-group; } }
Yes, you have the opportunity to duplicate the headings on the page, but it is still better than nothing. And if you find a large number of lines for your project, it will look the way you need it.
2) Prepare, for example, a special loaded version of the page with WKHTMLTOPDF . This way you can catch page breaks well and add what you need. This option provides maximum output flexibility, but it will take some time for support.
3) Calculate everything with JS. Print your page and analyze it - add some constants to js (height per page), and when someone tries to print - count the page breaks, find the nearest element and add what you need.
I hope you got an answer. Have a nice day.