TOC +Pagebreaks solved- now wrong pagenumbers

Hello aspose,
The problem i had with TOC and pagebreaks is now solved!((filed as 15774) Thanks for that!
But now it does something wrong with the page numbers instead of giving a pagebreak at that point
I will include my doc/images.:
To reproduce it:
Document “6391_(T15_39_20).docx” is the document which is want to use with your DLL so i do:

doc.UpdateFields()
doc.UpdatePageLayout()

After this the TOC is changed into “test1.jpg”( see attachment) .

When in Word i select the TOC and press F9(Update TOC table) then i get an TOC like in “test2.jpg” which is the correct TOC

So most of the pagenumbers from the headers are wrong after your updatefields procedure.
Look also a POINT 5!. There is a empty line (…) which is gone after Word updates the TOC. I think this has an connection with the update for the pagebreaks.
Hope you can produce it.
Let me know if you want to know more…
Greetings,
Michel

Hello

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
Best regards,

Hi Michel,
As a work around for now you can try removing the TOC style (Heading1 - Heading3) from the page breaks and empty paragraph markers. The page numbering should update correctly after this. If you need any help to do this, we will be glad to assist.
Thanks,

Hello Adam,
Yes, please. I want to test the workaround but don’t understand what you mean by “removing from the page breaks” etc.
You have my example file so please let me know what i must do?
Thanks,
Michel

Hello

Thanks for your inquiry. You should just remove TOC style (Heading1 - Heading3) from the page breaks and empty paragraph, please see the attached screenshot.
I send the refactored document to your e-mail.
Best regards,

Hello AndreyN,
Thanks for replying the workaround!
I have managed to use the workaround, to get a working template.
Off course i hope this can be fixed in a next release.
In the last release, there are TOC bugs solved.
But not the one i have given you : https://forum.aspose.com/t/68919
Did you already have the time to look at this one and do you have a workaround for this one?
Because i can’t see a difference between the doc/TOC in this post and the doc/TOC of the document in my post in above url.
Thanks in advance!

Hello

Thanks for your request. Unfortunately, this issue is still unresolved. I will let you know once there is something new regarding this issue.
Best regards,

Hello AndreyN,
Thanks again for your reply.
FOR YOUR INFO :
Your workaround didn’t always worked so i investigated it. My conclusion was that it wasn’t the 2 paragraphs you mentioned but it had to do with the page breaks. Look at my included images.
in this case i don’t delete the 2 paragraphs but change only, and all, the page breaks. Now the TOC is updated correctly with the right page numbers!!
Hope you can do something with it…
Greetings
Michel

Hello

It is perfect, that you already found the way to work the problem around.
We will be sure to inform you of any developments regarding this issue.
Best regards,

The issues you have found earlier (filed as 18427) have been fixed in this update.

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

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

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

What did you change on page break to work?
Because now I have the same problem with TOC and pagebreaks.

Thanks,
Peter

Hi Peter,

Thanks for your inquiry. I have attached an output Word document here for your reference. Could you please make a screenshot that highlights the problematic areas in the TOC. I will investigate the issue on my side and provide you more information.

Best regards,