I need insert footnotes in my PDF report (using python).
The code would produce something like:
1
This is a text .
and
1 This is a footnote
How I can do it?
I need insert footnotes in my PDF report (using python).
The code would produce something like:
1
This is a text .
and
1 This is a footnote
How I can do it?
from fpdf import FPDF
pdf = FPDF()
pdf.add_page()
pdf.set_y(-30) #30 CM from the bottom of the page
pdf.set_font('Arial', '', 8)
pdf.set_text_color(0)
pdf.cell(0, 5, '1 This is a footnote', 0, 0, 'C')
pdf.output("output 1")
This format will. properly align it to the footnote, you can change the adjust and the font type/size to a proper format here You can also add it to a method which can be called for any page.