I found a strange issue with the PDF generated in Lucee with <cfdocument> tag. The document spans multiple pages and I used <th> inside <thead> so that the content displays over the table in all the pages. The PDF was successfully created and rendered in the browser. On every page I can see the content in the <th> displayed above the table content. Then, if I try to use the print button in the rendered PDF in the browser (the button in the top right section along with download button) to physically print the document, the first page prints correctly. But subsequent pages just display the content inside the <th> and the rest of the body will be blank. The header and footer displays just fine.
We fixed it by removing the <th> tag and the content got displayed correctly.
I thought I will post this here so that if this is a bug in Lucee (version Lucee 5.1.3.18) it can be fixed by the team.