在reportlab中,可以使用indent()方法设置目录中标题的缩进。例如:
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet
doc = SimpleDocTemplate("example.pdf")
styles = getSampleStyleSheet()
# Create a TOC object
toc = TableOfContents()
# Add the TOC to the sto