Hi,
I created document with section from other file. This section contains IF field with Textbox in Table in result. Probably this is similar situation to
https://forum.aspose.com/t/numpages-in-textbox-is-not-updated/231958
See the sample program and the document used to replicate the bug
var document = new Document();
var documentBuilder = new DocumentBuilder(document);
documentBuilder.InsertBreak(BreakType.PageBreak);
var template = new Document(@"Header.docx");
var importedSection = (Section)document.ImportNode(template.FirstSection, true);
document.AppendChild(importedSection);
foreach (var node in document.Sections)
{
var sect = (Section)node;
sect.PageSetup.RestartPageNumbering = true;
}
document.UpdateFields();
document.UpdatePageLayout();
document.Save(@"Test.docx");
Header3.docx (19.7 KB)
Test.docx (26.3 KB)
Could you take a look?
Thanks,
Monika