I have found many older suggestions and solutions, none of which work as expected and many that just cause more issues.
Assume my web app allows users to create invoices and print them. These invoices may have any number of line items (even 100 or more). If the number of line items exceeds the page size, they are placed on the second page. This is fine.
What isn't fine is that if the second page should ever become separated from the first, it can get hard to tell which invoice it belongs to.
Is it at all possible (css, js, html, hacks, etc) to have a block of content repeat at the beginning of each and every paper page printed from a web page?
The linked possible duplicate question is from a few years ago and has no accepted answer, while the top answer doesn't actually work (as shown in the comments)