The thead html specification describes that it appears the same on top of every page. This means you can make it dynamic for specific pages.

Maybe the jsreport pdf utils dynamic header will work for you
https://jsreport.net/learn/pdf-utils