//manage linebreaks problematic in Aspose.words - remove page break and insert a new sectionbreaknewpage private static void RemovePageBreaks(Aspose.Words.Document doc) { DocumentBuilder builder = new DocumentBuilder(doc); foreach (Paragraph par in doc.GetChildNodes(NodeType.Paragraph, true)) { foreach (Run run in par.Runs) { //If run contains PageBreak then remove it and insert section break if (run.Text.Contains("\f")) { builder.MoveTo(run); builder.InsertBreak(BreakType.SectionBreakNewPage); run.Remove(); break; } } } }