Export to GitHub

flying-saucer - issue #146

Header/footer is shown only at the last page when the moved elements are after other content


Posted on Apr 29, 2011 by Grumpy Kangaroo

What steps will reproduce the problem?

Render to PDF some text with a header/footer that is moved to one of the top/bottom margins of all pages using CSS3 selectors. The header/footer element must be at the end of the source document, after all other content, like in the example below:

<style type="text/css">

footer {

position: running(footer); }

@page { @bottom-center { content: element(footer); } } </style> </head> <body> ...lots of text... <div id="footer">This should appear on all pages.</div> </body>

What is the expected output?

The header/footer should appear on all pages at the correct position.

What do you see instead?

  • When using @top-*, the header is shown only at the top of the last page.
  • When using @bottom-*, the footer is shown only at the bottom of the last page.

What version of the product are you using? On what operating system?

Master branch (8.99.2-26-g9176297) on Windows 7.

Please provide any additional information below.

A workaround to this bug is to move the header/footer elements to the beginning of the source document, before all other content.

Status: New

Labels:
Type-Defect Priority-Medium