2011-02-08 5 views
1

인사말,피사 및 마지막 페이지

나는 내 웹 페이지의 멋진 PDF를 생성하기 위해 PISA를 사용하고 있습니다. 어쨌든 저는 PDF 문서의 마지막 페이지에 꼬리말을 달아야합니다. "@page lastPage"라는 태그가 공식 문서에서 발견되었지만 제대로 작동하지 않습니다.

<style type="text/css"> 
    @page { 
     size: {{ pagesize }}; 
     margin: 1cm; 
     margin-bottom: 5.6cm; 
     margin-top: 7cm; 

     @frame header { 
      -pdf-frame-content: headerContent; 
      top:1cm; 
      margin-left: 1cm; 
      margin-right: 1cm; 
      height:6.5cm; 
      } 

     @frame middle{ 
      -pdf-frame-content: middleContent; 
      top:6.5cm; 
      margin-left: 1cm; 
      margin-right: 1cm; 
      height:14cm;  
     } 

    } 

    @page lastPage{ 
     size: {{ pagesize }}; 
     margin: 1cm; 
     margin-bottom: 5.6cm; 
     margin-top: 7cm; 

     @frame header { 
      -pdf-frame-content: headerContent; 
      top:1cm; 
      margin-left: 1cm; 
      margin-right: 1cm; 
      height:6.5cm; 
      } 

     @frame middle{ 
      -pdf-frame-content: middleContent; 
      top:6.5cm; 
      margin-left: 1cm; 
      margin-right: 1cm; 
      height:11cm;  
     } 

     @frame footer { 
      -pdf-frame-content: footerContent; 
      bottom: 0cm; 
      margin-left: 1cm; 
      margin-right: 1cm; 
      height:5.5cm; 
      text-align:left; 
     } 
    } 
</style> 

과 HTML :

... 
<div id="headerContent">my header</div> 
<div id="middleContent">my content</div> 
<div id="footerContent">I want this foot in the last page only</div> 
... 

당신이 날 도와 드릴까요 나는 내 코드의 당신 일부를 보여?

+0

질문에 문제가 있습니까? :( –

답변

1

당신은 아마 지금 쯤 해결 방법을 발견했습니다,하지만 난 the pisa mailing list에 걸쳐 발견 :

<pdf:nextpage template='lastPage' /> 

그것은 문서에서 명확하지,하지만 난 다른 페이지 레이아웃을 사용하기 위해 생각, 당신이 필요로하는 수작업으로 나누기를 지정합니다.

+0

내가 마지막 페이지를 쓸 것이라는 것을 알았을 때이 기능이 작동한다고 생각하지만 어떻게 예측할 수 없는지 어떻게 할 수 있습니까? (예 : 여러 페이지로 구성된 테이블의 경우) 감사합니다. – Don

+1

예, 전혀 작동하지 않는지 모르겠다. 적어도 나는 그것을 이해할 수 없었다 .XHTML2PDF는 다소 엉망이다. –