Please correct if I am wrong:

Your document has a table, which at some condition can exceed the available page space, so some part of the table wraps to the next page.

Each table part needs to have a header and footer rows.

If I understand you correctly, there is only a partial solution for the issue.

pd4ml.enableSmartTableBreaks(true) forces PD4ML to replicate table headers to each page the table needs/allocates. “Table header” is a row or many rows consist of

tags only.

Unfortunately there is no way to to the trick with a kind of table footer.