Table of content based on style not working

Hi there!


Still have to say that your product is awesome!

I have a little problem with my table of content… It’s a basic table of content based on specific style in document.

When generating report with culture-info FR-CA, everything is fine and table of content is generated properly.

When setting culture-info to EN-US, the table says there is no entry.

Is there any setting in my documents I have to change?

I’ve attached a sample project to illustrate the problem. When executed, it takes source document in “Source docs” folder and generate two PDFs (“working.pdf” and “not working.pdf”) to the “Output” folder.

Best regards,

Jsr

Hi there,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you save the final output document to Docx and update the TOC field manually using MS Word, you will get the same output.

You are facing this issue due to list separator. For English culture, the list separator is comma (,) and for French culture, it semicolon. See the attached images for detail. For English culture, please { TOC \H \Z \T “TITREENONCES,1” }.

You may also \O Switch in TOC filed to get the required output. { TOC \O \H \Z \T "TITREENONCES;1 }

Please let us know if you have any more queries.