I am converting a HTML document to PDF. This was simple enough to do. Open the html document. Save the html document with a PDF extension. Very cool, very easy, very straight forward.
I need to add a per-page header and footer to these documents. This header and footer is encoded in HTML also. In fact, it lives as separate HTML files. Does Aspose.Words have the ability to meet this need? I am hoping so, this product would save my project a ton of time and money.
This seems to make since, and I have tried the above steps before with no success. Here is some sample code that does NOT work. This was taken from the documentation link you sent me, and then combined with what you posted here as well. The result is a document with no header. Can you verify this on your end?
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.InsertHtml(
"<P align='right'>Paragraph right</P>" +
"<b>Implicit paragraph left</b>" +
"<div align='center'>Div center</div>" +
"<h1 align='left'>Heading 1 left.</h1>");
builder.MoveToHeaderFooter(HeaderFooterType.HeaderFirst); // for instance first page header
builder.InsertHtml("<p>this is a <b>test</b> header</p>");
doc.Save("d:\\DocumentBuilder.InsertHtml Out.doc");