I'm not trying to bombard you with my questions, but my new requirement has forced me to post another question.
This is also related to the old question. That solution has a page split based on a pattern. And generating empty headers for the rest of them.
My new attached file is a little different. But i have tried different ways to tweak the given code, but it didn't quite understand the page breaks.
Can someone kindly help again? This time, i will try to get a grasp of how the pattern is identified.