I am using the following code to add a new page in existing document.It is working but the newly created page copying the properties of old page ( header and footer).I wanted to add/append a new page without header and footer to existing document. Please suggest what is wrong here.Is there any way to get the last page and remove the header and footer
Below code is giving this xml
Paragraph paragraph = new Paragraph();
ParagraphProperties paragraphProperties = new ParagraphProperties();
SectionProperties sectionProperties1 = new SectionProperties();
SectionType sectionType1 = new SectionType() { Val = SectionMarkValues.NextPage };
//sectionType1.Descendants<FooterReference>();
sectionProperties1.Append(sectionType1);
paragraphProperties.Append(sectionProperties1);
paragraph.Append(paragraphProperties);
mainPart.Document.Body.InsertAfter(paragraph, mainPart.Document.Body.LastChild);