Hi all
I'm trying to render a PDF document based of a HTML string.
PdfDocument document = htmlConverter.Convert(source);
So far so good, pages render fine. I can even make a separate footer to be used on the document:
WebKitConverterSettings settings = new WebKitConverterSettings();
settings.PdfFooter = new PdfPageTemplateElement(rect);
Unfortunately I want to show two different footers - one on the first page and a different on the rest. According to the documentation this is done using page sections. But all documentation on sections assumes each pages is added to section as part of the render of the page, which is not the case with the HTML generated content. I've tried to remove the page from on section and then add it to a different page but without any luck.
This fails claiming the removed page is still part of a section and hence can't be added to a different section:
document.Sections.Add();
var page = document.Sections[0].Pages[1];
document.Sections[0].Pages.Remove(page);
document.Sections[1].Pages.Add(page);
Any suggestions?
Cheers,
Mads Anton