【发布时间】:2012-01-20 20:56:07
【问题描述】:
让页脚在 Pisa 文档的第一页上显示为一个框架,并在每隔一页显示为另一个框架时遇到了一些问题。我试图从 here 改编 lastPage 的想法,但没有运气。
可以这样做吗? <pdf:nextpage /> 在这里似乎不是正确的事情,因为该文档有一个可能(或可能不会)流过多个页面的长表。 <pdf:nextframe /> 加上仅首页的框架看起来很有希望,尽管我不确定如何准确使用它。
目前我有(为简洁起见):
<style type="text/css">
@page {
margin: 1cm;
margin-bottom: 2.5cm;
@frame footer {
-pdf-frame-content: footerFirst;
-pdf-frame-border: 1;
bottom: 2cm;
margin-left: 1cm;
margin-right: 1cm;
height: 1cm;
}
@frame footer {
-pdf-frame-content: footerOther;
bottom: 2cm;
margin-left: 1cm;
margin-right: 1cm;
height: 1cm;
}
</style>
<body>
<table repeat="1">
<!-- extra long table here -->
</table>
<div id="footerContent">This is a footer</div>
<!-- what goes here to switch frames after the first page? -->
<div id="footerOther"></div>
</body>
这会在每一页上放置相同的页脚。我需要在每个连续页面上留下相同的空间,但框架中没有内容。
【问题讨论】: