When exporting a document containing a FloatingImage in the header/footer the measurement of the header/footer height doesn't take into account the height of this image.
This leads to overlapping the page content with the image.
Workaround: Increase the Header (or Footer) top page margin by the height of the image:
foreach (Section section in this.document.Sections)
{
double floatingImageHeight = 0;
foreach (BlockBase block in section.Headers.Default.Blocks)
{
if (block is Paragraph paragraph)
{
FloatingImage floatingImage = (FloatingImage)paragraph.Inlines.FirstOrDefault(i => i is FloatingImage);
floatingImageHeight = floatingImage.Image.Height;
}
}
double left = section.PageMargins.Left;
double top = section.PageMargins.Top + floatingImageHeight;
double right = section.PageMargins.Right;
double bottom = section.PageMargins.Bottom;
section.PageMargins = new Telerik.Windows.Documents.Primitives.Padding(left, top, right, bottom);
}