HtmlSaveOptions.export_toc_page_numbers property. Specifies whether to write page numbers to table of contents when saving HTML, MHTML and EPUB... doc = aw . Document () builder =...= aw . DocumentBuilder ( doc = doc ) # Insert a table of contents...