Hello, I recently started using Migradoc to generate a pdf.
I'm having trouble with headers and footers. I have found a way to use different headers and footers on odd or even pages. However, to prevent content overlapping the header or footer I need to set margin for the document. But I've currently not found a way to set a different margin for odd or even pages, as my headers have different height. Which causes inconsistencies, is this even possible ?
Here is a samble of what I'm trying to achieve :
Code:
var section = _document.AddSection();
section.PageSetup.OddAndEvenPagesHeaderFooter = true;
section.PageSetup.TopMargin = Unit.FromCentimeter(3);
// Need another margin for even pages section.PageSetup.TopMargin = Unit.FromCentimeter(5);
var paragraph = section.Headers.Primary.AddParagraph()
paragraph.addText("odd header")
var paragraph2 = section.Headers.EvenPage.AddParagraph()
paragraph2.addText("even header")
var paragraph3 = section.Headers.EvenPage.AddParagraph()
paragraph2.addText("even header with more text")