When template file contains overlapping textboxes and one of them is a heading, doc.UpdateTableOfContents() generates an exception:
System.ArgumentException: An item with the same key has already been added. Key: Spire.Doc.Documents.Paragraph
at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
at spr?.?(Object A_0, spr? A_1)
at spr?.?(spr? A_0)
at spr?.?()
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0, RectangleF A_1)
at spr?.?()
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0, RectangleF A_1)
at spr?.?()
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0)
at spr?.?(RectangleF A_0)
at spr?.?(spr? A_0, spr? A_1, spr? A_2)
at spr?.?()
at spr?.?()
at spr?.?(Document A_0, List`1 A_1)
at Spire.Doc.Document.?(List`1 A_0)
If the textboxes are repositioned, no exception occurs. Valid and invalid templates are attached.
Version 9.7.3