0

How can I detect if a Table will trigger a new page and conditionally do things that make the printed experience better?

For example, if I have a table that must span a page break (despite intelligent use of the break-before / break-inside CSS properties), can I detect this and do something like re-render the column headers? Is there a way that I can detect the size of my output as it is rendered to understand if I'm in a page break zone, and then conditionally reform my html to accomodate?

I'm currently programming in Angular - but any JS/HTML/CSS based solution I'll be able to adapt.

tmptplayer
  • 434
  • 7
  • 18
  • 1
    Does this help? https://stackoverflow.com/questions/274149/repeat-table-headers-in-print-mode – Adam Sep 15 '22 at 02:39
  • 1
    Yeah - apparently my google skills failed me. That gets me 95% where I need to be. Is there a way to detect if I'm at a page break so that I can render borders at the bottom of each page? – tmptplayer Sep 15 '22 at 03:05
  • You could add a tfoot element and style that perhaps? – Adam Sep 15 '22 at 03:16

0 Answers0