-1

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?

Ami Tavory
  • 74,578
  • 11
  • 141
  • 185
Olga Donin
  • 69
  • 1
  • 3
  • What are you trying to do, exactly? Do you have a pdf document and you have to modify it? –  May 20 '15 at 07:43

2 Answers2

0

can this documentation help? DOC

farhawa
  • 10,120
  • 16
  • 49
  • 91
  • Thank you. I've tried to use it. It doesn't work. How I use [#]_? ptext = 'This is a paragraph with a footnote., [1]_ ? – Olga Donin May 20 '15 at 07:50
0
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.