MaikJaek / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by diog...@gmail.com on 29 Apr 2011 at 12:31