大家好,
我正在使用PISA来生成我的网页的一些漂亮的pdf。无论如何,我需要在pdf文档的最后一页添加一个脚注div -only。我在官方文档中找到了"@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>
...你能帮帮我吗?
发布于 2011-06-10 23:31:27
您现在可能已经找到了一种解决方法,但我是在the pisa mailing list上偶然发现的
<pdf:nextpage template='lastPage' /> 文档中没有明确说明,但我认为为了使用不同的页面布局,您需要手动指定分隔符。
https://stackoverflow.com/questions/4932073
复制相似问题