How to calculate the page size when printing?

There is data that is output in the form of a table of N pieces on each page, in the top of each page displays a small text, and followed by a table ie, page 1: the text table(rows 1-10) page 1: text table(line 11-21), ... .

The question how to break data into pages so that page is as complete as possible. Or at least how to know the page size when printing? Now I get 10 rows in the table, but if data is small, it remains a lot of space (even on 1-2 lines). It would have been easier if not for the text in the header, but alas it can not be removed - this printed form.
July 12th 19 at 17:30
1 answer
July 12th 19 at 17:32
Solution
The question is where to put page-break-after can be done via several options but before the table there is a text. - minerva_Buckridge38 commented on July 12th 19 at 17:35
: page-break-after to set to the diva div in the code. - Rey_Wate commented on July 12th 19 at 17:38
: what div do You mean? - minerva_Buckridge38 commented on July 12th 19 at 17:41
: make an empty div in the place where you want to interrupt your page and his page-break-after - Rey_Wate commented on July 12th 19 at 17:44
: It has been done and it is written in the subject, read the questions carefully. - minerva_Buckridge38 commented on July 12th 19 at 17:47
: Using js to check the size, remove extra div with page-break-after - Rey_Wate commented on July 12th 19 at 17:50
: It's obvious, if ideas how to calculate the height of the printing sheet not, you will be asked to leave. - minerva_Buckridge38 commented on July 12th 19 at 17:53
: www.webdevout.net/browser-support-css#css3propsprint But not supported in all browsers, I mean size (@page) - Rey_Wate commented on July 12th 19 at 17:56
: here's another thing, thank you. found an article on the subject, who could be useful https://www.smashingmagazine.com/2015/01/designing... - minerva_Buckridge38 commented on July 12th 19 at 17:59

Find more questions by tags HTMLCSS