Hi
I am converting html document to pdf and I have some problems with complicated footer / headers. I have idea how to do these but I just want to make sure that there is no better way to do these. Header and footers are mostly html/css defined but feel free to suggest other options too if necesarry.
What I need:
A: Section topic to footer/header (if page 5 has H1 header "Foo" and page 8 has H1 header "Bar" header on 5-7 should include "Foo" and 8+ "Bar"
B: Some elements on footer/header (example page number) should be every second page left or right.
C: I need to set header position to X inch over content.
D: I need also toc with page indexes
On case A and B I think that I should first covert actual content and after that do some manual analyze with HtmlToPdfResult.HtmlDocument and add footer and header somehow afterwards.
Case C has the problem that I want set headers position related to bottom of header. Header position is related to top of element I need to know height of element (and of course I don't know it). Should I somehow render header separately and put it in the document after I know its size?
Best way to work with D is propably this:
http://www.essentialobjects.com/forum/postst6063_Page-number-cross-reference-in-table-of-contents.aspxAnd of course: how do I can get all these most efficient as possible? Valid answer is too "you just have to render content, analyze it and render more stuff to it" if there is no shortcuts... Please suggest C# over VB on possible examples.