HI Im making a large table in MigraDoc and it automatically splits the table when it gets too large for on page. I have a logo in the header and my table when it goes to page 2 sits over the logo and doesnt go under. Anybody know how to make sure it goes under when it moves to additional pages?
Here is the logo code. Its just like their example in the Invoice
Image image = section.Headers.Primary.AddImage("H-Logo900x700.png");
image.Height = "2.5cm";
image.LockAspectRatio = true;
image.RelativeVertical = RelativeVertical.Line;
image.RelativeHorizontal = RelativeHorizontal.Margin;
image.Top = ShapePosition.Top;
image.Left = ShapePosition.Right;
image.WrapFormat.Style = WrapStyle.Through;
Sorry for answering delay..what ThomasH say's is correct,You should reserves space for header and footer (top and bottom margins)to prevent overlapping.Margin must be larger than the items added to the it(Header or Footer) in your case Image. If your Header (Image) is approx. 2.5cm you had to set
Section.PageSetup.TopMargin= Unit.FromCentimeter(3.0)
for Header
Section.PageSetup.BottomMargin= Unit.FromCentimeter(3.0)
for Footer
..I hope that you have add Section.
The PageSetup reserves space for header and footer (top and bottom margins). It's your responsibility to make the margins large enough to prevent overlapping between header and content.
Or with other words: it's a feature that header and content can overlap if you want it that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With