使用 rml2pdf 时如何删除默认页脚? [英] How to remove the default footers when using rml2pdf?
问题描述
我使用reportlab rml(report markup language)通过rml2pdf生成pdf,它带有默认的页脚内容,那么,如何删除pdf的页脚?(我在官方文档中找不到具体的解决方案).
您可能需要为页脚编写自己的样式表,使用该样式表您可以覆盖页脚
在
中可能有两个
部分.这是这样的RML2PDF解释的是第一个在该页面的故事内容之前进行,并且第二个是在故事之后进行.当您需要某些元素与其他元素重叠时,这可能很有用,当您使用
标签时特别有用.IncludePdfPages 放置一个数字从另一个 PDF 文件导入到您的文档中的页面,将它们放在您已有的内容上(包括您设计的任何页眉和页脚).这可能意味着它掩盖了页眉、页脚或其他东西否则你需要在非常页面上.解决这个问题的方法是将页眉和页脚放在第二个页面图形中部分,以确保它会出现在您故事中的任何内容上.只要你已经明智地定义框架它不会出现在页面的主要内容上,但会出现在包含的 PDF 的顶部RML 用户指南文档生成于 2014/09/25 13:10:59第 31 页允许您对这些页面具有与文档其余部分相同的外观
看一看(也许这行得通)
有关 rmltopdf 的更多详细信息,请阅读此内容
https://www.reportlab.com/docs/rml2pdf-userguide.pdf
使用reportlab plus版本我们无法隐藏,我们必须向reportlab索取商业包
但是
y 使用 trml2pdf 我们可以创建我们的自定义页脚,我们不需要为此支付任何费用
分叉的 trml2pdf 存储库
https://github.com/atuljain/trml2pdf
I use reportlab rml(report markup language) to generate pdf by rml2pdf, which comes with a default footer content, so, how to remove the footer of the pdf? (I can't find the specific solutions in the official document ) .
You may have to write your own stylesheet for footer , with that stylesheet you can overwrite your footer
you may have two <pageGraphics>
sections inside a <pageTemplate>
. The way this is
interperted by RML2PDF is that the first one is carried out before the contents of the story for that page, and the
second one is carried out after the story. This may be of use when you need some elements to overlap others,
and particularly useful when you are using the <includePdfPages>
tag. IncludePdfPages places a number
of pages imported from another PDF file into your document, placing them over the content you already have
(including any header and footers you have designed). This may mean it obscures headers, footers or something
else you need on very page. The way around this is to place your headers and footers in a second pageGraphics
section, which ensures that it will appear over anything in your story. Provided you have sensibly defined
frames it won't appear over the main content of your page, but it will appear over the top of your included PDFs
RML User Guide Document generated on 2014/09/25 13:10:59
Page 31
allowing you to have the same look-and-feel for these pages as you do for the rest of your document
take a look in(may be this will work)
<alias id="footerString" value="chapterName" />
for more detail of rmltopdf please read this
https://www.reportlab.com/docs/rml2pdf-userguide.pdf
By using reportlab plus version we can't hide , we have to ask for reportlab for there commercial package
but
y using trml2pdf we can create our custom footer, we don't need to pay anythign for that
Python - trml2pdf generating a blank PDF
forked trml2pdf repository
https://github.com/atuljain/trml2pdf
这篇关于使用 rml2pdf 时如何删除默认页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!