Creating page headers and footers using CSS for print

后端 未结 3 729
慢半拍i
慢半拍i 2020-12-02 07:30

I\'m creating a PDF using Flying Saucer (which dumps out CSS/HTML to iText to a PDF) and I\'m trying to use CSS3 to apply an image header and footer to each page.

I

3条回答
  •  春和景丽
    2020-12-02 08:25

    I spent a lot of time to get this working on modern Chrome, Firefox and Safari. I use this to create a PDF from HTML. You will get header and footer fixed to each page without overlapping the page content. Try it:

    CSS

    
    

    HTML

    
    
      
    
      
    footer
    Here your long long content...

    This text will not be broken between the pages

提交回复
热议问题