[英]Docraptor PDF: How to avoid displaying header in 2nd Page
我使用docraptor API生成PDF,而我的pdf可以有多个页面。 我已经为pdf设置了标题图片,但它出现在所有页面上。 我只需要第一页中的标题。
TIA
在这种情况下,Lecstor的答案肯定会起作用,但是可以在不同页面上使用不同的标题。
完整的文档可在Prince(DocRaptor的PDF渲染器)的Named Pages部分中找到,但其外观大致应如下所示:
<style type="text/css">
@page has-header {
@top {
content: "This is header of text";
}
}
.first-page {
page: has-header;
/* all content within .first-page will use the above @page styling */
}
</style>
<div class="first-page">
Put first page content here
</div>
<p>Rest of content will not have a header.</p>
该模式可以重复。 不同的命名页面可以具有不同的标题,不同的边距,不同的风景/肖像模式,大小等。
您不仅可以将其设置为文档开头的常规内容,还不能设置为每页重复的标题吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.