In our project we have experienced a problem with headings in a document. If those headings ends with a reference field it will not be added to the table of contents correctly. The TOC will display “Error! Bookmark not defined.” instead of the page number.
This has been tested in Aspose.Words for .NET version ‘14.5’ and ‘14.6’. Both are giving us the "Error! Bookmark not defined."
var doc = new Document();
var db = new DocumentBuilder(doc);
db.InsertField(“TOC”);
db.Writeln();
// Chapter 1.
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Heading1];
db.Writeln(“Chapter 1”);
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Quote];
db.Writeln(“value”);
// Chapter 2. Header text ending with a field.
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Heading1];
db.Write("Chapter 2 ");
db.InsertField(“STYLEREF QUOTE”);
db.Writeln();
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Normal];
db.Writeln(“Content”);
// Chapter 3. Header text has field in the middle.
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Heading1];
db.Write(“Chapter “);
db.InsertField(“STYLEREF QUOTE”);
db.Writeln(” 3”);
db.ParagraphFormat.Style = doc.Styles[StyleIdentifier.Normal];
db.Writeln(“Content”);
doc.UpdateFields();
Hi Alexander,
Best regards,
The issues you have found earlier (filed as WORDSNET-10517) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
The issues you have found earlier (filed as WORDSNET-10517) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(2)