You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
I need to give dynamic header to every page in wikihtmltopdf. Every page header should contain a section and subsection.
Currently, I am able to do this with code
<html><head><script>
function subst() {
var vars={};
var x=window.location.search.substring(1).split('&');
for (var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);}
var x=['frompage','topage','page','webpage','section','subsection','subsubsection'];
for (var i in x) {
var y = document.getElementsByClassName(x[i]);
for (var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]];
}
}
</script></head><body style="border:0; margin: 0;" onload="subst()">
<span class = "section"></span>
<hr/>
<span class = "subsesction"></span>
</body></html>
But this code is failing under two test cases
If a single page contains two subsection. It picks the top section and print it in the header.Due to this the next page contains subsection of the previous page in the header.
2.If a page doesn't contain any subsection. It prints subsection of the previous page in the header.
The text was updated successfully, but these errors were encountered:
I need to give dynamic header to every page in wikihtmltopdf. Every page header should contain a section and subsection.
Currently, I am able to do this with code
But this code is failing under two test cases
2.If a page doesn't contain any subsection. It prints subsection of the previous page in the header.
The text was updated successfully, but these errors were encountered: