SVG?
But...
Output of SVG in actual print can be quite unpredictable. Of course, I'd stick to a particular implementation, and just aim for it to come out right. Should be pretty simple.
Back when XML was the only way to go, there was a page-description language built on top. And it ultimately generates... PDF!
It's a pity that there appears to be little interest for page-oriented features of CSS: breaks, headers, footers, numbering, etc. Most don't work well or at all.