Hello,
We have purchased Aspose. Words license and implementing Words functionality in one of our project.
Word document with EndNote,in this end note contains numbers like
1 EndNote Import Test
2 Test endnote
3 Endnote Import Test 2
but while importing document displaying with Roman numbers like
i EndNote Import Test
ii Test endnote
iii Endnote Import Test 2
We have already raised the query in the below link
Please go through the forum thread once as it is urgent requirement.
Another Issue is when we read document which contains 5 endnotes,
Refer --> Screen shot with total Endnotes in the document.png
First 3 endnotes located in the first section content and other 2 endnotes in the section section content.
Refer -->Endnotes in the different Sections.png
Endnotes should display in the following order
Refer --> Expected Endnotes in the different Sections.png
The functionality implementation has stopped because of this issue. Kindly resolve this issue and update us ASAP, so that we can continue.
Below is the code using in the application
License lic = new License();
lic.SetLicense("Aspose.Words.lic");
// Document doc = new Document(@"E:\\Regeneron CCDS Template_revised draft 23Oct2015_FU4.docx");
Document doc = new Document(@"D:\\Regeneron\\Regeneron Roman.docx");
Document finalDoc = (Document)doc.Clone(false);
finalDoc.RemoveAllChildren();
ArrayList tocBookmarks = new ArrayList();
foreach (Field field in doc.Range.Fields)
{
if (field.Type.Equals(FieldType.FieldHyperlink))
{
FieldHyperlink link = (FieldHyperlink)field;
string fieldCode = link.GetFieldCode();
if (fieldCode.Contains("_Toc"))
{
tocBookmarks.Add(link.SubAddress);
}
}
}
doc.UpdateListLabels();
for (int i = 0; i < tocBookmarks.Count; i++)
{
Paragraph startPara = (Paragraph)doc.Range.Bookmarks[tocBookmarks[i].ToString()].BookmarkStart.ParentNode;
// Console.WriteLine(startPara.ToString(SaveFormat.Text));
divheading.InnerHtml += startPara.ToString(SaveFormat.Text) + "";
Paragraph endPara;
if (i + 1 == tocBookmarks.Count)
endPara = doc.LastSection.Body.LastParagraph;
else
endPara = (Paragraph)doc.Range.Bookmarks[tocBookmarks[i + 1].ToString()].BookmarkStart.ParentNode;
if (endPara != null)
{
ArrayList extractedNodes = ExtractContent(startPara, endPara, true);
Document dstDoc = GenerateDocument(doc, extractedNodes);
dstDoc.FirstSection.Body.Paragraphs[1].Remove();
if (i + 1 != tocBookmarks.Count)
dstDoc.LastSection.Body.LastParagraph.Remove();
divheading.InnerHtml += dstDoc.ToString(SaveFormat.Html) + "";
finalDoc.AppendDocument(dstDoc, ImportFormatMode.UseDestinationStyles);
}
}
Please find the total code and source doucment as an attachment(s) to this mail.
Thanks