A multiline(paragraph) footer and header in reportlab

前端 未结 4 1763
一向
一向 2020-12-15 20:38

What is a best way to have a footer and header in reportlab, that not just a single line, that can be drawed with canvas.drawString in onPage function. Didn`t find a way to

4条回答
  •  悲&欢浪女
    2020-12-15 20:55

    Additional Approach for adding the header or footer on all pages: there are arguments for the build method to do this.

    Do not use the frame and template in the answer by jochen. In the last line, use

    doc.build(text, onFirstPage=footer, onLaterPages=footer)
    

    the rest of the approach will be the same as from jochen.

提交回复
热议问题