2017-03-29 6 views
1

play2-pdf를 사용하여 응용 프로그램에서 PDF 생성 첫 번째 표지를 만들었지 만 다른 페이지를 추가하려고하면 같은 PDF 페이지에 추가됩니다. 어떻게 나는 또한 내 첫 번째 페이지에 바닥 글을 추가하기 위해 노력하고있어 같은 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

에게 있습니다 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