First please make sure you use PD4ML Pro. Std version ignores the header tag.

is mapped to PD4ML header definition API. It preallocates header space even for skipped pages. An alternative is to use newer tag and control the header appearance with scope attribute. In the case header space is allocated only where a header is to be printed.