Why does my header end up way outside the page with TuesPechkin?

231 views Asked by At

I do a convert

    document.Objects.Clear();
    document.GlobalSettings.PaperSize = PaperKind.A4;
    document.Objects.Add(new ObjectSettings
    {
        HtmlText = xml,
        HeaderSettings = new HeaderSettings { HtmlUrl = headerPath, RightText = "[page]/[sitepages]", ContentSpacing = 10 },
        FooterSettings = new FooterSettings { HtmlUrl = headerPath, RightText = "[page]/[sitepages]" },
    });

and the HTML is visible in the footer, but in the header it's way outside the page. It looks like it tries to put the header on the previous page, that's how far outside it it.

1

There are 1 answers

0
liftarn On BEST ANSWER

OK, the answer was as simple and not obvious. The header HTML is a bit more sensitise so it needed a <!doctype html> first in the file.