We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Placing toc at absolute page-position

how can i set the table-of-content (toc) to an absolute position (in points) of a current page (like shapes)

Or how can i set its position relative to a previous textbox on its page

Hi

Thanks for your inquiry. TOC is inline item and you can't set absolute position of TOC.

Best regards.

thank you for answering, but can you give me a short example in c#

Hi

Sorry, I meant that there is no way to set absolute position of TOC.

Best regards.

ok, but is it possible to place it relative to a shape or kind of anchor?

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for asking this.

MS Word document file is organized in several so-named stories. The document flow with all inline contents is the main story. Other kinds are headers, footers and text boxes. To make TOC absolutely positioned we would place it in a text box. That text box would be positioned and anchored somehow. But we already tried this. In result that’s possible to place TOC in any story but MS Word doesn’t update it. So it’s a restriction of MS Word.

Please let us know why you need to position the TOC absolutely. We’ll try to invent a workaround to achieve the same document layout.

Regards,

we need to convert our press-reviews to word-doc. Our main-application is a pixel-related tool to save our documents to pdf. now we must give the user the ability to save its press-review in word-format with 1:1 appearances. So it is inevitably to place the toc at absolute position, because several fix texts and drawings sourounds the toc for CI lookings.

Hello!<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for clarification. First of all, I must warn you about fidelity of PDF export. You will never get output 100% exact to the original MS Word document. Usually we help to improve fidelity in particular cases making changes to Aspose components and refactoring source documents wherever possible. Before you put PDF export into production be sure you get what you expect from it. You are free to perform experiments and ask particular questions here.

As I wrote earlier, MS Word cannot update TOC placed in a text box. This is a restriction of Word itself. How do you plan to update it? Maybe you can utilize this idea:

1. Place TOC at the document end inline.

2. Prepare an empty text box of appropriate size.

3. Move TOC to the text box when it is already updated.

Another popular idea is building TOC manually: collecting all headings, placing bookmarks, populating TOC with references to actual headings. This requires some coding but we can help you if needed.

At the moment I don’t see how we can reliably work-around the problem. If it is not difficult for you please attach any example of what you are trying to achieve in the document and explain what may be important.

Regards,