我有一个项目列表,我想在三列中进行布局。列表很长(使用3列布局可能需要5页)。条件如下:
我尝试为第二帧和第三帧提供一个margin-top,第一页看起来正确,但“中间”页面没有。 margin-top将应用于所有页面。
帮助将不胜感激。
答案 0 :(得分:1)
当框架填满时,比萨将自动使用下一帧。 usage.rst中解释了这个例子:
<html>
<head>
<style>
@page {
size: letter portrait;
@frame header_frame { /* Static frame */
-pdf-frame-content: header_content;
left: 50pt; width: 512pt; top: 50pt; height: 40pt;
}
@frame col1_frame { /* Content frame 1 */
left: 44pt; width: 245pt; top: 90pt; height: 632pt;
}
@frame col2_frame { /* Content frame 2 */
left: 323pt; width: 245pt; top: 90pt; height: 632pt;
}
@frame footer_frame { /* Static frame */
-pdf-frame-content: footer_content;
left: 50pt; width: 512pt; top: 772pt; height: 20pt;
}
}
</style>
<head>
<body>
<div id="header_content">Lyrics-R-Us</div>
<div id="footer_content">(c) - page <pdf:pagenumber>
of <pdf:pagecount>
</div>
<p>Old MacDonald had a farm. EIEIO.</p>
<p>And on that farm he had a cow. EIEIO.</p>
<p>With a moo-moo here, and a moo-moo there.</p>
<p>Here a moo, there a moo, everywhere a moo-moo.</p>
</body>
</html>
HTML内容将从Page1.Col1流向Page1.Col2到Page2.Col1等。以下是生成的PDF文档的样子:
+-------------------------------+ +-------------------------------+
| Lyrics-R-Us | | Lyrics-R-Us |
| | | |
| Old MacDonald farm he had a | | a moo-moo everywhere a |
| had a farm. cow. EIEIO. | | there. moo-moo. |
| EIEIO. With a moo- | | Here a moo, |
| and on that moo here, and | | there a moo, |
| | | |
| (c) - page 1 of 2 | | (c) - page 2 of 2 |
+-------------------------------+ +-------------------------------+