I want to set custom header, footer in printing using javascript.
I want like below:
// page 1 start
<b>THIS IS HEADER html code</b>
<p>This is record 1</p>
<p>This is record 2</p>
<p>This is record 3</p>
<p>This is record 4</p>
<p>This is record 5</p>
<p>This is record 6</p>
<b>THIS IS FOOTER html code</b>
// page 1 end
// page 2 start
<b>THIS IS HEADER html code</b>
<p>This is record 1</p>
<p>This is record 2</p>
<p>This is record 3</p>
<p>This is record 4</p>
<p>This is record 5</p>
<p>This is record 6</p>
<b>THIS IS FOOTER html code</b>
// page 2 end
I implement this some years ago via javascript active shell script. Please let me know some other solution for this or any else solution?