Incorrect page numbers in the TOC

Hi, here is an example file (ignore the contents as I’ve had to clean it up for privacy reasons). You’ll notice that, starting from page 14, the TOC page numbers are still incorrect even though I have changed all widths to not use percentage values.

The document I prvided actually has cell/column widths specified as this is what we get out of Reporting Services when rendered in Word format. However, I have also attempted to set the widths of all cells for all rows in all tables to the same width in code (using your API) and that did not resolve the issue.
Attaching a 6-8 page document wasn’t going to work as the problem usually occurs much later in the document - often 20-30 pages into it.
What I’ve noticed is that if I open an Aspose.Words generated document in Word, do a save, and then update the TOC field programmatically (again, using Aspose.Words) then everything seems to work as expected. I haven’t done enough tests to be absolutely sure of this but I thought I’d mention it as it might be useful in resolving this issue.

What you’re suggesting is precisely what I have done - the table widths were not set at all and column/cell widths were set to fixed-point values. I have done that for all cells in all rows in all tables yet the problem still persists. My understanding was that you were able to reproduce this problem at your end - is that right?

Hi.

We are using Aspose.WORD 11.3, and we’re experiencing the exact same problem as described here. I’ve tried updating to Aspose WORD 11.7, but alas, the problem persisted.

I looked through all the release notes from 11.7 to 13.1, and noticed that this error reoccurred in 13.1:

WORDSNET-7616 Document.UpdateFields do not update the TOC field correctly

We are in the process of renewing our licence, but this issue is placing us in a touch position: We are weeks away from a release, and it is not ideal to have to upgrade so close to a release.

I’m wondering if you can give me any more clues as to why this error occurs. Our live environment also uses 11.3, but the problem does not occur there, it only occurs in our dev branch. Yet, we didn’t really make any major changes since the previous release. I remember we made some changes to expose the PreferredWidth property in our wrapper class, but the offending table does not use any percentage widths in its columns.

Please see the attached document. The problem begins with the Market Value (ZAR) section: The section below should say page 6, instead it shows page 11. If I generate the document without the Market Value section, the TOC numbers shows correctly for a couple more sections before the warping starts. So, whatever the problem is, it must be something in “Market Value (ZAR)”, but I’m really baffled as to what it could be.

If you can suggest a work around for the time being, that would be greatly appreciated.

The issues you have found earlier (filed as WORDSNET-6337) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.