There is a great feature in reportlab that easily lets you generate table of contents automatically every time you add some headings in your PDF document. However, this feature works only if you use BaseDocTemplate as your parent class, and not SimpleDocTemplate.
Since SimpleDocTemplate does not override the method multiBuild() from the BaseDocTemplate, which is needed in order to generate the table of contents, I cannot use a feature of SimpleDocTemplate such as onFirstPage and onLaterPages.
Would be nice to add a support for table of contents for SimpleDocTemplate as well.
There is a great feature in reportlab that easily lets you generate table of contents automatically every time you add some headings in your PDF document. However, this feature works only if you use BaseDocTemplate as your parent class, and not SimpleDocTemplate.
Since SimpleDocTemplate does not override the method multiBuild() from the BaseDocTemplate, which is needed in order to generate the table of contents, I cannot use a feature of SimpleDocTemplate such as onFirstPage and onLaterPages.
Would be nice to add a support for table of contents for SimpleDocTemplate as well.