To extract table of contents from Microsoft Office Word document getToc method is used. Table of contents is generated by paragraphs with H1-H9 build-in styles.
Warning getToc method returns null value if table of contents extraction isn’t supported for the document. For example, table of contents extraction isn’t supported for Txt files. Therefore, for Txt file getToc method returns null. If Microsoft Office Word document has no table of contents, getToc method returns an empty collection....isn’t supported for TXT files. Therefore, for TXT file method returns...