2

Simply, I am using The FPDF library in Python to generate a PDF document including a Table of Contents. In the table of contents I want to link from the page number cell to the corresponding page in the PDF document. This is called an internal link. It does not work. When I open the document in Adobe Acrobat or Chrome and try clicking on the page number in the Table Of Contents nothing happens. Here is the code snippet. Thanks!

''' from fpdf import FPDF

#Page number

        pageLink = pdf.add_link()
        curPageNum =  t['p']
        pdf.set_link(pageLink, page=2)
        this.cell(PageCellSize,this.font_size+2,str(t['p']),0,1,'R',link=pageLink)
                  

'''

NBessmer
  • 87
  • 2
  • 9

0 Answers0