Does the MigraDoc table view the title on page 2?

HI Im creates a large table in MigraDoc, and it automatically splits the table when it becomes too large for the page. I have a logo in the title, and my table, when it goes to page 2, sits above the logo and does not fall under it. Does anyone know how to do this when he goes to additional pages?

Here is the logo code. Its just like their example on 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; 
+7
c # pdfsharp migradoc
source share
3 answers

PageSetup reserves space for the top and bottom fields (top and bottom fields). It is your responsibility to make the fields large enough to prevent a match between the header and the content.

Or in other words: this is a function that the title and content may overlap if you want to.

+8
source share

Sorry for the delay in return. What ThomasH says correctly, you need to reserve space for the upper and lower fields (upper and lower fields) to prevent overlap. The margin should be larger than the elements added to it (header or footer) in your case image. If the title (image) is approx. 2.5cm you had to install

Section.PageSetup.TopMargin= Unit.FromCentimeter(3.0) for the title

Section.PageSetup.BottomMargin= Unit.FromCentimeter(3.0) for the footer

.. I hope you have added a section.

+15
source share

Document document = new document ();
Section section = document.AddSection ();

For the title: Section.PageSetup.TopMargin= "1cm"; // depending on the height of the image

For the footer: Section.PageSetup.BottomMargin= "1cm"; // depending on the height of the image

-one
source share

All Articles