Im creating a PDF-Document with MigraDoc. I added a full size "Header" to all Pages:
Image bg = section.Headers.FirstPage.AddImage(@"\\server\header.bmp");
bg.Height = "29.7cm";
bg.Width = "21cm";
bg.RelativeVertical = RelativeVertical.Page;
bg.RelativeHorizontal = RelativeHorizontal.Page;
bg.WrapFormat.Style = WrapStyle.Through;
Now i want to add Text from a Textbox to that Page:
Paragraph paragraph = section.AddParagraph();
paragraph.Format.SpaceBefore = "7.5cm";
paragraph.Format.SpaceAfter = "5";
paragraph.Format.Font.Color = Color.FromCmyk(100, 100, 100, 100);
FormattedText ft = paragraph.AddFormattedText(this.gMailItem.Body);
The problem i have is that the text Im adding could be bigger than one page is. If this happens, the text is printed over the "full size header"/stationery. Is there a way to limit the height of a Document (to force a page break)?
EDIT: Here is a picture of my problem: http://img4host.net/upload/1014244953be8611defa9.PNG