问题
We are having different templates for PDF Headers and Body respectively. Now we want different Headers on different pages. We are converting HTML to PDF using NReco and version is 1.1.12.
回答1:
you can use some thing like this
now u just need to set class to ur headers parent element like i did here
to print p1-header add class p1, to print p2-header add class p2 to its container on that particular page
<header class="p1">
// this p1-header will be visible only rest will hide
<h1 class="p1-header">some text p1</h1>
<h1 class="p2-header">some text p2</h1>
<h1 class="p3-header">some text p3</h1>
</header>
.p1-header, .p2-header, .p3-header{
display: none;
}
.p1 .p1-header{
display: block;
}
.p2 .p2-header{
display: block;
}
.p3 .p3-header{
display: block;
}
来源:https://stackoverflow.com/questions/40024115/is-there-a-way-to-set-different-headers-on-different-pages-using-nreco-pdf-gener