Skip to main content linkedinfacebooktwittermenuarrow-up

TOC - page numbering done without depending on Microsoft WORD Completed

Currently in order to get the TOC to display the proper page number for the Headings involved, you need to set the TOC to dirty and then open in MS WORD, allow WORD to re paginate and store the TOC page numbers and then save. Please have GEMBOX Document have a function to re-paginate the document and update the TOC page numbering.

Official response

Mario at GemBox


We have added support for updating TOC numeric fields, but also other document's numeric fields (Page, PageRef, NumPages, Section, and SectionPages) as well while paginating the document by specifying PaginatorOptions.UpdateFields member to "true".

Now you can remove the use of IsDirty:
toc.IsDirty = true;

And use the following instead:
document.GetPaginator(new PaginatorOptions() { UpdateFields = true });

See Table of Contents (TOC) demonstration sample: