I am looking for a cross-browser solution to print a table with 100+ rows, where the header repeats on every page.
I am working with ASP Classic, using VBScript, Javascript and jQuery 1.11.1 in Chrome, and the solution must work in Chrome, IE and Firefox.
This is what I have tried so far:
I have tried variants of CSS:
page-break { page-break-before:always; }
This only creates a header on the first page, and not on any other page in Chrome. (why is it still an issue, Google?) So I threw that one away.
I spent the other day working with HTML DOM. The idea is to create a series of tables (i.e.:
document.createElement("TABLE")
), then have each table fit on 8x11 paper (landscape orientation):var valT = 0 var elem = document.getElementById(title); if (elem.offsetHeight / 970) { r = x.insertRow(varR); r.style.height = "30px"; valT++; } else { ....
This almost worked, if the height of the rows remain constant. Therein lays the problem: the row height does not remain constant. There is a lot of wrangling with that which resulted in frustration.
- Because I have the data in a JSON object, I am considering a JSON-to-PDF solution. Does one exist that will meet the requirements (100+ rows, header on every page)
Before I bang my head against the wall, can anyone offer any working solutions?