I have a docx document which includes a table of content. When I convert it to HTML, the TOC looks different from original Word document. The numbers aren’t aligned to right. Do you have any ideas with this issue? I attach docx and html in this post.
Thanks for your query. I have tested the scenario with latest version of Aspose.Words for .NET and have found another issue. The page numbers of table of contents are missing in output HTML. I have logged this issue as WORDSNET-6894 in our issue tracking system. I have also logged the same issue which you are facing in our issue tracking system. (The numbers aren’t aligned to right).
I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
Further to my last reply, Please use HtmlSaveOptions.ExportTocPageNumbers propery to export TOC page numbers in output HTML. I have logged the page number alignment issue as WORDSNET-6907 in our issue tracking system. I have linked this forum thread to the same
issue and you will be notified via this forum thread once this issue is
resolved.
Document doc = new Document(MyDir + "in.docx");
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.ExportTocPageNumbers = true;
doc.Save(MyDir + "AsposeOut.html", saveOptions);
We are facing the same issues as WORDSNET-6907 and would like to ask for the status of this issue.
When converting a ToC from Word to HTML (by using the Word function) the ToC is exported to HTML with the “…”, e.g.
Heading 1…3
Heading 2…5
We would assume that this behavior would also be applicable with Aspose.Words by setting the “ExportTocPageNumbers” property to true or maybe adding another property for controlling the dot addition.
Thanks for your inquiry. I am afraid this issue WORDSNET-6907 has now been postponed till a later date due to some other important issues and new features. We will inform you as soon as there are any further developments.
Unfortunately, Aspose.Words does not support tab leaders (e.g dots) upon exporting to HTML at the moment. However, we had already logged this feature request as WORDSNET-5003 in our issue tracking system. You will be notified via this forum thread once this feature is available.