Hello,
i want to use the same Header/footer on the imported documents. (I want to use the Header/footer with i used on my “new document”. All pages should have the same (without firstpage))
It doesnt work, what is my mistake? Demo is attached!
Thank you very much,
best regards
Bernhard
Hi Bernhard,
Thanks for your inquiry. Your document contains multiple sections with different header/footers. In this case, we suggest you please use HeaderFooterCollection.LinkToPrevious method to link or unlink all headers and footers to the corresponding headers and footers in the previous section.
Please use following code snippet before saving the document. Hope this helps you.
foreach (Section section in builder.Document)
{
if (!section.Equals(builder.Document.FirstSection))
{
section.HeadersFooters.LinkToPrevious(true);
}
}