Forum How do I...?

Repeat element on every page

John
Hello,

I need to repeat a div (sort of a tabular register) on every page, but cannot figure out how. As this should be either on the left or right side of the page I cannot get it done using the header/footer margin boxes. I have tried

position: fixed

but prince appears to treat it the same as
position: absolute

and it is shown on the first page only. Is this correct?

I thought maybe I could inject the container using javascript, but there is no event, telling me about a new page (box), beside that, I believe javascript is actually executed when the layout process is already finished, correct?

John
Okay, just figured it out. Prince supports all margin boxes, even left and right. That's just awesome. Thanks.
mikeday
JavaScript is actually executed before layout starts, but that means you can't use it to add content while layout is underway, aside from prince-script() in generated content.

Why can't you use header/footer margin boxes, exactly?
mikeday
Okay just replied before I saw your reply. :)
John
Thanks for your reply mikeday. I was under the impression Prince only supported the header and footer margin boxes, but I was wrong. In the meantime I have run into a different problem (CSS 3 Transforms are not applied to annotations).

Aside from that, thanks for the heads up regarding prince-script. This could turn out to be very useful.