Insert a page break before the insert in the target document of another document

I have several documents to insert into a target document. they should each begin on a new page of the target document.What are the possibilities for this ?


Thanks for your inquiry. Please follow up the code snippet to combine multiple documents.

Document dstDoc = new Document("d:/temp/Poetry0.docx");

Document srcDoc = new Document("d:/temp/Poetry1.docx");
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.NewPage;
foreach(Section srcSection in srcDoc)
    srcSection.PageSetup.PageWidth = dstDoc.LastSection.PageSetup.PageWidth;
    srcSection.PageSetup.PageHeight = dstDoc.LastSection.PageSetup.PageHeight;
    // Import section
    Section newSection = (Section) dstDoc.ImportNode(srcSection, true, ImportFormatMode.KeepSourceFormatting);
// Save output

In case of any ambiguity, please let me know.

Thx !