@media print {
@page {
@bottom-center { content: counter(page) }
}
works with https://pagedjs.orghttps://developer.mozilla.org/en-US/docs/Web/CSS/@page#brows...
That said, I've always used paged.js with its polyfills to fill in other gaps. So maybe there's something I'm unaware of.
Why do you call paged.js a "hack"?
I'm a big fan of paged.js.
These generator pages already rely on javascript to put our database data onto the page, whether by URL parameters or API calls, so once I'm in that mode, yeah I'm generating everything with article.innerHTML = '...' to get a bulk template on the page, and a series of createElement/append to make smaller elements like table rows.
I also made this sample file that shows thead repeating, but since it's a single continuous table it doesn't preview very well and spills out of the 8.5x11 article element. I'm not sure how I would take advantage of the browser's automatic thead/tfoot repeat while also accurately previewing the result in the browser, especially with more elements below the table.
https://voussoir.net/writing/css_for_printing/sample_longtab...
But I'm open to suggestions that would spare me from splitting the table after a height threshold!