Hello,
You are right, there is no way of knowing page numbers at runtime. Also, it is not currently possible to have a header only on the first page.
As for having the header in the content, it could work with the page-break-before or page-break-after css rules. An example:
<div class="header" style="height:200px">
Header on the first page
</div>
Page 1 content
<div style="page-break-before:always;height:200px"> </div>
Page 2 content