First page in Migradoc PDF file should not have page header.
All remaining pages should have same header.
I tried
Code:
var document = new Document { };
var Section = document.AddSection();
Section.PageSetup = document.DefaultPageSetup.Clone();
Section.PageSetup.DifferentFirstPageHeaderFooter = true;
Section.Headers.Primary.AddParagraph("Page header for all pages except first page");
Section.PageSetup.TopMargin = "1cm";
Section.PageSetup.HeaderDistance = 0;
for (int i = 1; i < 77; i++)
Section.AddParagraph("Line " + i);
But this adds also empty space in top of first page:
If
Quote:
Section.PageSetup.TopMargin = "0cm";
Is used, header overlaps with contents:
How to add header starting from second page so that there is no empty space in start of first page ?
Negative SpaceBefore for first paragraph in page fixes the issue. Since this is ignored for first paragraph, it requires adding dummy zero-heigth paragraph before it.
DifferentFirstPageHeaderFooter also requires duplicating footerfor first and remaining pages.
Should those hacks used?
Using .NET Core PdfSharp-Migradoc