Retrieve the collection of Paragraph nodes of the document.
Load a document into the Document class by passing a file path or stream to the appropriate Document constructor.To remove page and section breaks from a document you should follow the steps below: This sample shows how to remove page and section breaks from the document using Aspose.Words. This forces a page break before the paragraph. A Paragraph with ParagraphFormat.PageBreakBefore set.A Section which is set to begin on a new page (by the section’s PageSetup.SectionStart to SectionStart.NewPage).This is represented in a document by the page break character ControlChar.PageBreakChar. You may also want to remove redundant page breaks after mail merge.Īn explicit page break can be caused by many different things in a document: For example, after appending multiple documents together you may want to remove the separate section and combine them into one. In most cases it is convenient to have a structured document, but sometimes multiple sections and user-defined page breaks are redundant and it may become necessary to remove them. Likewise, a document can have explicit page breaks to separate content on different pages. A document often consists of several sections, for example section breaks to provide different page settings for different parts of the document.