Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MigraDoc table goes over header on page 2?

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;
like image 560
gmoney Avatar asked May 30 '14 18:05

gmoney


2 Answers

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.

like image 98
user3928461 Avatar answered Nov 04 '22 20:11

user3928461


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.

like image 14
I liked the old Stack Overflow Avatar answered Nov 04 '22 22:11

I liked the old Stack Overflow