How to remove the default footers when using rml2pdf?

前提是你 提交于 2019-12-14 02:37:24

问题


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 ) .


回答1:


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



来源:https://stackoverflow.com/questions/33951499/how-to-remove-the-default-footers-when-using-rml2pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!