FootnoteIssue.zip (98.8 KB)
Hi,
I tried to create a copy of an original file using the original file using Aspose and I noticed some of the footnotes are hidden automatically when the file is copied. I have attached both the original file as well as the file converted by Aspose. Our program is set up to change the header and footer to 0.5ā and remove if there are any page numbers in the document. These changes are done using Aspose. Once these changes are done, Aspose is supposed to create a copy of that file and save it. In the copied file, we are missing the footnotes numbers 4 and 5.
I figured out this is because the table is getting divided into two parts, when we move the table to the next page, the hidden footnotes appear back. How can we solve this from the backend permanently? Could you please help?
@vasudevan Could you please provide a simple code that will allow us to reproduce the problem? We will check the issue and provide you more information.
I have tried to reproduce the problem with the following simple code, but all footnotes are properly preserved:
Document doc = new Document(@"C:\Temp\OriginalFile.docx");
// Remove page numbers.
List<Field> pageNumners = doc.Range.Fields.Where(f => f.Type == FieldType.FieldPage).ToList();
foreach (Field f in pageNumners)
f.Remove();
// Chnage header and footer distance
doc.FirstSection.PageSetup.HeaderDistance = ConvertUtil.InchToPoint(0.5);
doc.FirstSection.PageSetup.FooterDistance = ConvertUtil.InchToPoint(0.5);
doc.Save(@"C:\Temp\out.docx");
Hi,
I forgot to mention that I am also adding the top and bottom margins in the document along with some other changes. So, I have created a testing word file that will replicate the same issue Iām talking about. Please use the file attached to this reply for testing and use the code below for testing. You will notice that footnote 3 will be hidden in the copied document using Aspose. Please let me know the possible fix for this.
Testing.docx (45.4 KB)
Code:
Document doc = new Document(@"C:\TEMP\Testing.docx");
doc.FirstSection.PageSetup.HeaderDistance = ConvertUtil.InchToPoint(0.5);
doc.FirstSection.PageSetup.FooterDistance = ConvertUtil.InchToPoint(0.5);
doc.FirstSection.PageSetup.TopMargin = ConvertUtil.InchToPoint(0.5);
doc.FirstSection.PageSetup.BottomMargin = ConvertUtil.InchToPoint(0.5);
doc.Save(@"C:\Temp\out.docx");
@vasudevan Thank you for additional information. It looks like not Aspose.Words issue. The same behavior can be observed if change page margins in MS Word. Looks like MS Word glitch.