hugojerez / flying-saucer

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

Problem in creating header and footer #169

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I tried the example given in the below link 
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-
and-itext.html

My requirement is to create header and footer repeat in all the pages in the 
PDF.

What is the expected output? What do you see instead?
I want the header content to be displayed in all the pages. But only in the 
first page i have the content that also inside the margin.

What version of the product are you using? On what operating system?
I am using the latest version the latest version and using Ubuntu 10.04

Please provide any additional information below.

Original issue reported on code.google.com by pradeep...@gmail.com on 17 Aug 2011 at 6:58

Attachments:

GoogleCodeExporter commented 8 years ago
I confirm the same on Windows 7 and the FS R8 package. Just running the example 
code renders the header only on the first page.

Original comment by wojci...@biela.pl on 18 Aug 2011 at 4:51

Attachments:

GoogleCodeExporter commented 8 years ago
I guess the example is out of date or sth, using the CSS3 @page it works well
eg.

your CSS:
@page { 
size: a4 landscape;
  @bottom-right {
    content: element(footer);
  }
}

and in your HTML
    <div style="position: running(footer);">
      <div id="page-footer" class="small">
        <div class="line"> </div>
        Page <span class="page" /> of <span class="pagecount" />
      </div>
    </div>

Original comment by wojci...@biela.pl on 18 Aug 2011 at 8:16