2017-03-29 11 views
1

私はplay2-pdfを使ってアプリケーションを作成しています。最初にカバーページを作成しましたが、他のページを追加しようとすると同じpdfページどのように私はまた私が私の最初のページにフッターを追加しようとしているが、まだ同じ問題ヘッダーとフッターについては再生PDFを使って別のページを作成する方法

<html> 
    <head> 
     <style> 
     p.serif { 
     font-family: "Times New Roman", Times, serif; 
     } 
     p.sansserif { 
     font-family: Arial, Helvetica, sans-serif; 
     } 
     </style> 
    </head> 
    <body> 
     this is a test 
     <div style="position:absolute; bottom:0;right:0;margin:24px;">by bSuccess</div> 
    </body> 
</html> 

enter image description here

答えて

1

を持って、次のことができ、同じPDF文書内の複数のページを作成することができますCSSページングメディアモジュールを使用する(https://www.w3.org/TR/css3-page/

例:改ページについては

<html> 
    <head> 
     <style> 
      @@page { 
       @@bottom-right { 
        content: "by bSuccess"; 
        font-size: 14px; 
       } 
      } 
     </style> 
    </head> 
    <body> 
     this is a test 
    </body> 
</html> 

、あなたはCSSの改ページのプロパティを使用することができます(https://css-tricks.com/almanac/properties/p/page-break/

例:

<html> 
    <head> 
     <style> 
      @@page { 
       @@bottom-right { 
        content: "by bSuccess"; 
        font-size: 14px; 
       } 
      } 
     </style> 
    </head> 
    <body> 
     <div>this is a test</div> 
     <p style="page-break-after:always;"></p> 
     <div>testing page break</div> 
    </body> 
</html> 
+0

はあなたの助けのためにありがとうございました!! – Rajeun

関連する問題