def footer(canvas, doc):
    canvas.saveState()
P = Paragraph('This is a multi-line footer.  It goes on every page.  ' * 10,
    styleN)
w, h = P.wrap(doc.width, doc.bottomMargin)
print('w, h:', w, h)
print('doc.leftMargin:', doc.leftMargin)
P.drawOn(canvas, doc.leftMargin, 10)
canvas.restoreState()
How to add multiple lines at bottom (footer) of PDF?