can some one give me some C# code to remove the first blank page from this document but still keep the header and footers in the document. I have manged to get rid of the first page but I loose the header and footers in the rest of the document.
public static void MergeHeaderFooter(Section srcSec, Section dstSec, HeaderFooterType headerType)
{
HeaderFooter header = dstSec.HeadersFooters[headerType];
if (header == null)
{
// There is no header of the specified type in the current section, create it.
header = new HeaderFooter(dstSec.Document, headerType);
dstSec.HeadersFooters.Add(header);
}
foreach (Node srcNode in srcSec.HeadersFooters[headerType].ChildNodes)
{
Node dstNode = dstSec.Document.ImportNode(srcNode, true, ImportFormatMode.KeepSourceFormatting);
header.AppendChild(dstNode);
}
}